[R] Changing code within a package

Duncan Murdoch murdoch at stats.uwo.ca
Thu Mar 6 22:17:57 CET 2008


On 3/6/2008 3:57 PM, Shewcraft, Ryan wrote:
> I was able to hack the code in the polspline package in order to change
> the plot.polymars function so that I can set the limits of my y-axis.
> However, I was only able to do this by entering plot.polymars in R,
> copying the code to Word, changing what I needed, and then pasting the
> new code in R to redefine the polt.polymars function.  I was able to
> successfully change the function, but now I would like to be able to
> insert this changed code into the polspline package so that I can use it
> with python.  Is there any easy way to just copy and paste my hacked
> code in or do I need to go through a more complicated process?
> 
> Sorry if this is a bit unclear--I'm not yet familiar with R-jargon so
> let me know if you have any questions.

What you should do is download the source of package, and make your 
changes there.  Then run R CMD INSTALL to install it.

It would also be polite to mention your changes to the package author 
and/or maintainer; they might incorporate them into the next release of it.

Duncan Murdoch



More information about the R-help mailing list