Sorry, I gave you the wrong magic

x <- r("'rownames<-'")(x, foo)

-G

On 6/11/08 12:01PM , "Renato Alves" <[EMAIL PROTECTED]> wrote:

> Hi Gregory,
> 
> I've been trying to understand how to do the equivalent with the
> colnames function... without much success.
> 
> I haven't been able to use your suggestion. I always get the error:
> unexpected '[' in "["
> 
> Apart from this, is <- valid python syntax? Or did you meant to say = ?
> 
> An example like this in the documentation would be very helpful.
> 
> Thanks
> 
> Quoting Gregory Warnes on 06/09/2008 05:42 PM:
>> As for changing he names on an existing object, you can't use the
>> rownames(x) <- foo syntax trick in python.  Internally R converts
>> function calls of this sort to
>> 
>> "[<-rownames"(x, foo)
>> 
>> Given this fact, you can use
>> 
>> x <- r("[<-rownames")(x, foo)
>> 
>> to change the rownames.
>> 
>> -G
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list

-- 
Program Director
Center for Computational Arts, Sciences, and Engineering
Univerisity of Rochester

Tel: 585-273-2794
Fax: 585-276-2097
Email: [EMAIL PROTECTED]



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to