Displaying 1 result from an estimated 1 matches for "withen".
Did you mean:
withe
2011 Apr 07
1
transform() on selective names. Is it possible?
...colnames(z) <- c('x','y')
par(mfrow=c(1,3))
plot(z, pch=5, col="blue")
whiten <- function(x) { (x-mean(x))/sd(x) }
zz <- transform(z, x=whiten(x), y=whiten(y))
plot(zz, pch=3, col="red")
#code ends
And everything looks fine enough.
But now I want to withen just one of the columns and I won't know
which one until my script is running, hence I can't hard code it in
the script.
Then I though, well maybe if I define some convenient f...
#begin code
f <- function(a) { paste(a,"=withen(",a,")", sep='') }
a <- ...