Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206235

restoring R environment to condition prior the loading of a package

$
0
0

In a script I need to load packages tydiverse and gdistance.

gdistance actually loads several other packages and overall mask some functions of the tydiverse (e.g. select).

I tried to rearrange the script by loading the gdistance only when needed and having the related lines at the end of the script.

Anyway one of the very last line I need still use the function tydiverse::select, which is then not found and it throws an error.

Is there a way to make a copy of the R environment before loading the gdistance package so that I can then restore the environment as it was before loading the pakage that induce the problem?


Viewing all articles
Browse latest Browse all 206235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>