[R] blank pdf output when called in a loop

Nicolas STRANSKY stransky at BroadInstitute.org
Wed Jul 21 03:45:02 CEST 2010


On 7/20/10 8:14 PM, David Winsemius wrote:
> 
> On Jul 20, 2010, at 7:21 PM, Joshua Wiley wrote:
> 
>> Hi Nicolas,
>>
>> You nee to explicitly wrap it in print() when it is inside a loop (if
>> I'm not mistaken also when inside a function).  With lattice loaded,
>> you can find the specific print methods by methods(print) .
> 
> The interpreter handles finding the proper print methods. You just need
> to have a clear list in your mind regarding what is base graphics
> (e.g.plot)  and what is grid graphics (e.g. xyplot and qplot). This is
> part of the FAQ which points out that this also applies to any
> "source()"-ed code:
> 
> http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f

Thanks!
print() indeed does the job. I was fighting with this for quite some
time, it didn't occur to me to use print().

Nico

-- 
Nicolas STRANSKY, Ph.D.
Computational Biologist, Cancer Program
Broad Institute of MIT and Harvard
5CC-1339  |  7 Cambridge Center  |  Cambridge, MA  02142, USA
Phone: +1 617 714 7564           |    nico at BroadInstitute.org



More information about the R-help mailing list