Hi Marco.

Usually, you can replace them by underscore, i.e.

k = rpy.r.terrain_colors(100)

should work.

Cheers,

thomas.


marco hofmann wrote:

>Peter schrieb:
>  
>
>>marco hofmann wrote:
>>    
>>
>>>Hi there,
>>>I'm not familiar with R.. and use RPy to use the graphical features of R
>>>with Python.
>>>
>>>...
>>> >>> rpy.r.image(x,y,z,axes=FALSE)
>>>
>>>Traceback (most recent call last):
>>>   File "<pyshell#8>", line 1, in <module>
>>>     rpy.r.image(x,y,f,axes=FALSE)
>>>NameError: name 'FALSE' is not defined
>>>
>>>rpy.r.image(x,y,z) does only work without additional arguments. Does
>>>anyone know how I can code that in Python?
>>>      
>>>
>>The problem is much simpler, FALSE is not defined in python (it is in
>>R).  You just need to use False instead (or zero). Try this:
>>
>>rpy.r.image(x,y,z,axes=False)
>>    
>>
>
>Thanks Peter,
>i see, I thought I was just in R inside the brackets of 
>rpy.r.image(...), but its still Python there.
>So for more advanced features, I have to create an appropriate R object 
>first like
>
>k= rpy.r.rainbow(100)
>rpy.r.image(x,y,z, col = k)
>
>By the way,
>
>k = rpy.r.terrain.colors(100)
>
>fails. Is there trick to get access to the terrain.colors or to other R 
>functions which have a dot (I don't know if there are many)?
>
>Marco
>
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>_______________________________________________
>rpy-list mailing list
>rpy-list@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/rpy-list
>  
>


-- 
-------------------------
Thomas Walter

EMBL Heidelberg
Meyerhofstrasse 1
69117 Heidelberg
Germany

Tel: +49 (0)6221 387-8857



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to