Hi,
I am trying to save plot outputs in pdf file format using RPy2.
The usual simple routine that I would do in R is something like this:
x <- rnorm(100)
pdf("/home/me/public_html/test.pdf")
hist(x)
dev.off()
Now, using Rpy2, I am trying the same job, but I am getting error message
for r.dev.off().
Here are python commands.
>>> import rpy2.robjects as robjects
>>> r = robjects.r
>>> x = r.rnorm(100)
>>> mypdf = r.pdf("/home/me/public_html/test.pdf')
>>> mypdf = r.hist(x)
>>> mypdf = r.dev.off()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/usr/releng/tools/python/2.4.1/lib/python2.4/site-packages/rpy2/robjects/__init__.py",
line 511, in __getattribute__
raise orig_ae
AttributeError: 'R' object has no attribute 'dev'
Is there anybody knows how to properly use R pdf() and dev.off() using RPy?
Thank you in advance.
Ki
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list