On Aug 8, 2012, at 2:16 PM, greatest.possible.newbie wrote:
Ok I see that point with the quotes. But what I want to do still
doesn't
work:
a <- matrix(1:15,ncol=3)
b <- paste( paste("a[," ,paste(1:3), "]",sep="")
,"^",1:3,sep="",collapse="+")
b
#[1] "a[,1]^1+a[,2]^2+a[,3]^3"
#instead of (wh
On Aug 8, 2012, at 2:16 PM, greatest.possible.newbie wrote:
Ok I see that point with the quotes. But what I want to do still
doesn't
work:
a <- matrix(1:15,ncol=3)
b <- paste( paste("a[," ,paste(1:3), "]",sep="")
,"^",1:3,sep="",collapse="+")
b
#[1] "a[,1]^1+a[,2]^2+a[,3]^3"
#instead of (wh
nditional & loop argument into a function
Ok I see that point with the quotes. But what I want to do still doesn't
work:
a <- matrix(1:15,ncol=3)
b <- paste( paste("a[," ,paste(1:3), "]",sep="")
,"^",1:3,sep="",collapse="+")
Ok I see that point with the quotes. But what I want to do still doesn't
work:
a <- matrix(1:15,ncol=3)
b <- paste( paste("a[," ,paste(1:3), "]",sep="")
,"^",1:3,sep="",collapse="+")
b
#[1] "a[,1]^1+a[,2]^2+a[,3]^3"
#instead of (which I want)
a[,1]^1+a[,2]^2+a[,3]^3
#[1] 1368 1779 2264 2829 3480
The quotes shown on a string when you print it are artifacts of making the
string usable in source code... they are not present in the string as it is
stored in memory. (Same goes for escape sequences, such that "\n" occupies one
byte of UTF8 storage.)
You can use the cat function to send the s
Hello,
The other problem with the boxplot question is that it's ill defined.
Those data[,1], ..., data[, n] variables, what are they? All of them
numeric? If so, then where is the factor?
Some time ago there was a question on multiple boxplots with cut()
defining the factor. I wrote a benera
Thank you for your improvement suggestions.
I forgot to write the I() and it's clear that I have to specify the data
(which I was indicating with the '...' without explicitly writing it).
In this special case where I need a formula you really helped me with the
function as.formula() to transform t
First thing; are you trying to fit a model specified as
y ~ X + X^2 + X^3 ?
... because if you are you're unlikely to get anything useful. That uses
formula syntax in which ^ does not have the arithmetic power meaning; see
section 11.1 'Defining statistical models; formulae' in 'an introduction
8 matches
Mail list logo