[R] how to continue develop package

Liaw, Andy andy_liaw at merck.com
Tue Mar 9 23:57:23 CET 2004


My suggestion is to treat the installed package as `binary', even if the
code is purely in R.  This way you will only make modifications to the
_source_ and make up the `binary' as needed.  It's really not burdensome.

Your second question has nothing to do with ESS.  When you modify objects on
the search list, the modified copy is placed in the global environment
(pos=1).  After you experimented with the modification and are happy with
it, just place it in the package and re-install.

It doesn't make sense to edit code in the installed package directly:  That
will be the only copy of the changed package, and you won't be able to
package that up for installation by others, at least not easily.

HTH,
Andy


> From: Vadim Ogranovich
> 
> Hi,
>  
> I have completed a prototype of a package, say FOO, and now I want to
> start using it as an ordinary R package, i.e. attach it via
> library("FOO"). On the other hand I will be adding functionality and
> fixing bugs so the code is going to change a lot. There is a couple of
> problems that don't know how to solve:
>  
> 1. To be able to use library() the package must be INSTALLED. The
> installation creates a copy of the code. So it seems each 
> time I change
> the code I need to repeat R CMD INSTALL. This is not too bad, 
> but maybe
> there is a better way
> 2. (This is probably more of an ESS question) Suppose I have attached
> FOO via library("foo") which is now at the second position of 
> the search
> list. Now if I use ESS to modify the definition of some function goo()
> from the package "FOO" and send the new definition to R it will NOT
> replace the old definition, rather creates a new function at the first
> position of the search list. The new function will of course 
> overshadow
> the old one so I'll achieve the effect I want, but I'd feel 
> better if I
> could replace the old definition rather than overshadow it. Does ESS
> allow this sort of things?
>  
> These are my specific questions, however if you can suggest a 
> different
> way of on-going development of a package I'd love to hear from you.
>  
> Thanks,
> Vadim
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
> 


------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}




More information about the R-help mailing list