On Tue, Jan 8, 2013 at 10:34 AM, Mohit Khanna
<[email protected]> wrote:
> I am trying the following code--
>
> from rpy import *
> r.library("ltm")
>
> dat= #some data frame or matrix
> r.ltm(r('dat~z1'))
>
> error coming is---
> RPy_RException: Error in eval(expr, envir, enclos) : object 'dat' not found
>
> Please tell me the right way to call ltm function using rpy library
Hi,
Not sure about rpy older than 2.x, but you miss globalenv
http://rpy.sourceforge.net/rpy2/doc-2.3/html/robjects_rinstance.html?highlight=globalenv
For example:
from rpy import *
# ... import globalenv here ...., rpy2: from rpy2.robjects import globalenv
r.library("ltm")
globalenv['dat'] = #some data frame or matrix
r.ltm(r('dat~z1'))
Regards,
w
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list