On 13/09/2011 2:28 PM, Henri Mone wrote:
Dear R users and experts,
I need to modify an exisiting R function from a package. The function/
variable is inside a namespace and I have problems accessing it.
I only need to get access to to corresponding sourcecode. I localised
the "RDX" and "RDB" files. But it seems to be a binary format.
How can I convert it to an ASCII format to open and extract the code
from a text editio?
If you are modifying a package, you should work on the source code, not
the binary code. Use
download.packages("foo", destdir="somewhere", type="source")
to download a .tar.gz file containing the source. Then use "tar zxvf
foo..." outside of R to extract the files.
Alternatively, just load the package and print the function definitions
to cut and paste into a file. But this will generally lose the comments
and helpful formatting.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.