[R] Convert "RDX" and "RDB" to ASCII format?
murdoch.duncan at gmail.com
Tue Sep 13 20:35:50 CEST 2011
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.
More information about the R-help