Re: [Rpy] load R-library via rpy2

2009-01-08 Thread Anne Ghisla
Oliver Tomic ha scritto: > I forgot to mention that I tried the following with rpy2, but without > success: > import rpy2.robjects as robjects robjects.r['library(epiR)'] Hello Oliver, try this: [code] import rpy2.robjects as robjects robjects.r.library("epiR") [/code] or, more like t

Re: [Rpy] load R-library via rpy2

2009-01-07 Thread Anne Ghisla
Scrive Oliver Tomic : > I forgot to mention that I tried the following with rpy2, but without > success: > > >>> import rpy2.robjects as robjects > >>> robjects.r['library(epiR)'] Hello Oliver, try this: [code] import rpy2.robjects as robjects robjects.r.library("epiR") [/code] or, more like t

Re: [Rpy] load R-library via rpy2

2009-01-07 Thread Oliver Tomic
Thank you Laurent! This did it, now it works! Cheers Oliver Laurent Gautier wrote on 07.01.2009 11:08:39: > Hi Oliver, > > '(' is not '['. > > Check > http://rpy.sourceforge.net/rpy2/doc/html/introduction.html#calling-r-functions > then > http://rpy.sourceforge.net/rpy2/doc/html/robjects.htm

Re: [Rpy] load R-library via rpy2

2009-01-07 Thread Laurent Gautier
Hi Oliver, '(' is not '['. Check http://rpy.sourceforge.net/rpy2/doc/html/introduction.html#calling-r-functions then http://rpy.sourceforge.net/rpy2/doc/html/robjects.html?highlight=evaluate#strings-as-r-code and eventually http://rpy.sourceforge.net/rpy2/doc/html/robjects.html?highlight=evaluate

Re: [Rpy] load R-library via rpy2

2009-01-07 Thread Oliver Tomic
I forgot to mention that I tried the following with rpy2, but without success: >>> import rpy2.robjects as robjects >>> robjects.r['library(epiR)'] Traceback (most recent call last): File "", line 1, in robjects.r['library(epiR)'] File "C:\Python25\Lib\site-packages\rpy2\robjects\__init_

[Rpy] load R-library via rpy2

2009-01-07 Thread Oliver Tomic
Hi, I am sorry about this trivial question, but what is the obvious way to import a library in R in via rpy2? If I do the following in R: > library(epiR) Package epiR 0.9-14 is loaded Type help(epi.about) for summary information > What is the equivalent in rpy2? Windows XP Python 2.5 rpy2 2