On Sun, 2008-08-17 at 13:48 -0400, Vince Fulco wrote: > Oddly on the original WXP box and running in IDLE, the R graphics > device appears but no plot is drawn and no error message is given. > Running from the CLI, the plot is generated w/o a hitch.
Event loops entanglements, I suppose. The code code runs fine in IDLE on Linux. I'll try to fix that up (if I can), before the beta. If anyone has experience (or would like to gain experience) with this sort of issues on WinXP, please do not hesitate to step forward. > On an unrelated note, trying a standard install on my FC8 x86_64 box > fails with Rinternals.h, Rdefines.h, etc. not found. They do exist in > the path "include/R/" Do you mean "/include/R" ? If yes, that might be a little too exotic for the current setup.py (the setup.py is still a little rough, and will not cover a number of situations). Try editing to your liking the line in setup.py that goes like: include_dirs = [ os.path.join(RHOME, 'include'), (so tentatively: include_dirs = [ '/include/R', ) I'll see how I can improve setup.py to either have an automatic detection or allow a manual specification of the directory. L. > HTH & TIA. > > Vince Fulco > > On Sun, Aug 17, 2008 at 3:49 AM, Laurent Gautier <[EMAIL PROTECTED]> wrote: > > 2008/8/17 Vince Fulco <[EMAIL PROTECTED]>: > >> x = robjects.r.rnorm(100) > >> > >> robjects.r('hist(%s, xlab="x", main="hist(x)")' %repr(x)) > >> > >> Traceback (most recent call last): > >> File "<pyshell#10>", line 1, in <module> > >> robjects.r('hist(%s, xlab="x", main="hist(x)")' %repr(x)) > >> File "C:\Python25\Lib\site-packages\rpy2\robjects\__init__.py", line > >> 421, in __call__ > >> p = self.parse(text=string) > >> File "C:\Python25\Lib\site-packages\rpy2\robjects\__init__.py", line > >> 335, in __call__ > >> res = super(RFunction, self).__call__(*new_args, **new_kwargs) > >> RRuntimeError: Error in function (file = "", n = NULL, text = NULL, > >> prompt = "?", srcfile = NULL, : > >> unexpected input in "hist(c(1.90855727703905, 1.05953538072277, > >> 1.81164302718342, -0.156598628840518, > >> " > >> > >> what isn't visible in the above error or the variable x when called is > >> that line terminators are displayed. Are these causing the error > >> similar to some pure python instances on WXP? Have not tried yet on > >> linux box. > > > > The example above seems to working on Linux. > > > > Something wrong might be happening during the call to __repr__() and, > > as you point it out, have something to do with line terminators. > > > > The code for object representation in robjects is: > > def repr_robject(o): > > s = r.deparse(o) > > s = str.join(os.linesep, s) > > return s > > > > The problem you are having suggests that the same line separator is > > used by R across > > all platforms (no matter what the platform's native separator is). > > > > Can you try the following ? > > > > > > import rpy2.robjects as robjects > > > > > > # patch 'repr' > > def repr_robject(o): > > s = robjects.r.deparse(o) > > s = str.join('\n', s) > > return s > > robjects.repr_robject = repr_robject > > > > > > x = robjects.r.rnorm(100) > > h = robjects.r('hist(%s, xlab="x", main="hist(x)")' %repr(x)) > > > > > > > > > > Thanks, > > > > > > L. > > > > > > > > > >> TIA, Vince > >> ### > >> System is windows xp sp2 > >> print(robjects.r) > >> <rpy2.robjects.R object at 0x00C522D0>An object of class "simple.list" > >> > >> $platform > >> > >> [1] "i386-pc-mingw32" > >> $arch > >> [1] "i386" > >> $os > >> [1] "mingw32" > >> $system > >> [1] "i386, mingw32" > >> $status > >> [1] "" > >> $major > >> [1] "2" > >> $minor > >> [1] "7.1" > >> $year > >> [1] "2008" > >> $month > >> [1] "06" > >> $day > >> [1] "23" > >> $`svn rev` > >> [1] "45970" > >> $language > >> [1] "R" > >> $version.string > >> [1] "R version 2.7.1 (2008-06-23)" > >> > >> > >> > >> -- > >> Vince Fulco, CFA, CAIA > >> 612.424.5477 (universal) > >> [EMAIL PROTECTED] > >> > >> ------------------------------------------------------------------------- > >> This SF.Net email is sponsored by the Moblin Your Move Developer's > >> challenge > >> Build the coolest Linux based applications with Moblin SDK & win great > >> prizes > >> Grand prize is a trip for two to an Open Source event anywhere in the world > >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ > >> _______________________________________________ > >> rpy-list mailing list > >> rpy-list@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/rpy-list > >> > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list