On 4/17/10 3:44 PM, Gary Strangman wrote: > > Hi rpy'ers, > > In the older versions of rpy(2?), I could redirect stdout to a file to > capture all console output. This was adequate, though I got lots of extra > info over and above what R would print for the same object. (For example, > when printing the result of an lm() model fit, I'd get the entire dataset > and call parameters, as well as the standard R output tables.)
There are ways to avoid that verbosity (they'll be documented after the release - too little time before that). > With rpy2-2.1 (on windoze anyway), I cannot even redirect the output via > stdout. I tried the examples in the doc for consolePrint() and those > failed as well (note the examples on > http://rpy.sourceforge.net/rpy2/doc-2.1/html/callbacks.html#console-i-o > do not have proper camel case in them). So, the question is ... if I have > something like the following model: Would you consider contributing: - win32 binaries ? - the eventual necessary patch to get it to compile ? > fit = rpy2.robjects.r.lm(fmla,data) > > how can I capture (in a file or a string) the output that /R/ would give > when printing the variable fit? (I know there's been extensive discussion > of this general topic on the list, and that R is not friendly for doing > what I'm requesting. I was wondering, though, if there are substantial > changes in rpy2-2.1 as regards this topic.) Without a specific code example of what you are doing, I assume that this is: print(fit). There were substantial changes in rpy2-2.1 about that. R is using a console output, so it felt more consistent to use the console callback (and somehow make all this more programmer-friendly). I hoped to leave the win32 part intact, although without testing it and with the intent of getting the callbacks to finally work under win32 (win32 is currently not officially supported for rpy2-2.1). Laurent > Thanks! > > Gary > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the e-mail > contains patient information, please contact the Partners Compliance HelpLine > at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list