Lionel Roubeyrie wrote:
 > I know that cc=r.assign("coordinates(d)", c) is false, but I don't
 > find a way to assign columns names : r.coordinates(d)=c is also wrong.
 > It's certainly a stupid question, but how do you do that?

There are probably more elegant solutions... but have you tried 
something like this:

r("colnames(d) <- c(%s)" % ",".join(c))

Or this little example, which creates a variable "x" within R,

from rpy import r
r("x <- matrix(c(1,2,3,4,5,6), nrow=3, ncol=2)")
r("colnames(x) <- c('one','two')")
r("rownames(x) <- c('a','b','c')")
r("print(x)")
r("dim(x)")

Peter


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to