r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of bill.venab...@csiro.au
Sent: Wednesday, 6 October 2010 2:07 PM
To: macque...@llnl.gov; raznah...@mail.nih.gov; r-help@r-project.org
Subject: [ExternalEmail] Re: [R] Using as.polynomial() over a matrix
I was unaware of this discussion
010 2:07 PM
To: macque...@llnl.gov; raznah...@mail.nih.gov; r-help@r-project.org
Subject: [ExternalEmail] Re: [R] Using as.polynomial() over a matrix
I was unaware of this discussion till now, so I'm not up with what's been said
already.
Here is how I would go about the problem I think y
ter
is just there for backward compatibility reasons.
Bill Venables.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of MacQueen, Don
Sent: Wednesday, 6 October 2010 1:23 PM
To: Raznahan, Armin (NIH/NIMH) [E]; r-help@r-project.org
Subject: Re: [
The key is in the help page for apply. It says (in part):
In all cases the result is coerced by Œas.vector¹ to one of the
basic vector types before the dimensions are set, so that (for
example) factor results will be coerced to a character array.
So although as.polynomial() returns
it looks like as. polynomial merely stores the coefficients of the
polynomial.
"Internally, polynomials are simply numeric coefficient vectors of
class "polynomial". "
If you really want to print it in the form you want try this.
m <- matrix(rnorm(3000),1000,3)
apply(m, 1, function(x){
Hello All
First - a warning. I'm not very R or programming savvy.
I am trying to do something without much luck, and have scoured help-pages, but
nothing has come up. Here it is:
I have a matrix (m) of approx 40,000 rows and 3 columns, filled with numbers.
I would like to convert the contents
6 matches
Mail list logo