The problem is that in python '.' (period) is a valid character in a
variable/function *name*, while it is not valid in python. To
overcome this problem, use '_' (underscore), which RPy will translate
to a '.'
So, try
palette = r.brewer_pal(3, "Greens")
-Greg
On May 12, 2007, at 3:22 PM, John Owens wrote:
> John Owens <john_owens <at> yahoo.com> writes:
>
> + >>> palette = r.brewer.pal(3, "Greens")
> + Traceback (most recent call last):
> + File "<stdin>", line 1, in ?
> + File "/opt/local/lib/python2.4/site-packages/rpy.py", line 286,
> + in __getattr__
> + return self.__getitem__(name)
> + File "/opt/local/lib/python2.4/site-packages/rpy.py", line 290,
> + in __getitem__
> + obj = self.__dict__[name] = self.__dict__.get(name, self.get
> (name))
> + rpy.RException: Error in get(x, envir, mode, inherits) : variable
> + "brewer" was not found
>
> This does work, though, not sure why the original did not:
>
> palette = r('brewer.pal(3,"Greens")')
>
> JDO
>
>
>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> rpy-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rpy-list
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list