[R] creating R packs for all

Patrick Connolly p_connolly at ihug.co.nz
Mon Mar 26 09:02:32 CEST 2007


On Fri, 23-Mar-2007 at 06:00PM +0000, Prof Brian Ripley wrote:

|> On Fri, 23 Mar 2007, Erin Hodgess wrote:
|> 
|> > Dear R People:
|> >
|> > I am in the process of creating an R package via Windows.
|> >
|> > If I would decide to submit in to CRAN, what would I need to
|> > do in order to make it run for the Linux or Mac People, please?
|> 
|> If it passes R CMD check on Windows it should work anywhere.  About
|> the only thing that is fussier on Unix than Windows is the use of
|> the correct line endings for C etc files.  (OTOH, Windows adds
|> restrictions that 'R CMD check' checks for Unix users.)

There are graphics functions that can be called in platform specific
ways.  Hard-wired coding that calls a default plotting device with
unnamed arguments can make no sense on another platform.

Using Linux, one gets:

> args(x11)
function (display = "", width = 7, height = 7, pointsize = 12, 
    gamma = getOption("gamma"), colortype = getOption("X11colortype"), 
    maxcubesize = 256, bg = "transparent", canvas = "white", 
    fonts = getOption("X11fonts"), xpos = NA, ypos = NA) 

Using Windows, the first argument is absent so code that assumes
arguments are in the same order (say by not using names) irrespective
of platform will fail even though R CMD check looks fine. 

Perhaps it could all be summed up by a general problem with hard-wired
graphics calls (such as WMF files).  From my limited experience they
would not be that difficult to avoid.



-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}          		 Great minds discuss ideas    
 _( Y )_  	  	        Middle minds discuss events 
(:_~*~_:) 	       		 Small minds discuss people  
 (_)-(_)  	                           ..... Anon
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



More information about the R-help mailing list