Recover Rcpp source file

Maybe. sourceCpp() has a cacheDir argument (defaulting to getOption("rcpp.cache.dir", tempdir())) that specifies a location under which intermediate files, including the original source file, are saved. If the directory hasn't been cleaned up, you should find a folder there named "sourceCpp-<platform-info>" and under there, directories for each sourceCpp call you have done: these will contain the original file.


The temporary directory of your R session (tempdir()) will contain a folder named sourceCpp-<architecture>->Rcpp-version> with sub-directories named sourcecpp_<random>. One of these will contain your code (plus the autogenerated code).

Tags:

R

Rcpp