[R-pkg-devel] Is it possible to reverse engineer a package from the installed library directory ?

Ben Bolker bbolker at gmail.com
Thu Mar 24 03:25:57 CET 2016


  You could take your old install and do this:

   library("your_package")
   funs <- ls(pos="package:your_package")
   dump(funs,"your_package.R")

   that wouldn't recreate documentation, NAMESPACE files, etc., but it 
would be a start.

On 16-03-23 04:43 PM, Paul Hurley wrote:
> Several years ago I assembled some of my own most used code into a package,
> and had that installed on my machine.  Since then I have lost the source
> files, but still have the package installed in an old v2.x R installation.
>
> I now need to use the package in my current R install, which is v3.1, and
> won't let me just copy the directory across, as it complains it was build
> pre v3.  Is it possible to reverse engineer a package back to R source
> files so I can then rebuild it in a new package ?
>
> Thanks
>
> Paul.
>
> --http://www.paulhurley.co.uk
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list