piedpiper
piedpiper

Reputation: 1360

Is there a way to automatically install all package requirements for an R file?

I have an R file, but it has packages which are not installed on my R installation. Is there a utility which determines these dependencies from the R file and installs all of them? I don't want to manually install them one by one.

Upvotes: 1

Views: 104

Answers (1)

tlhenvironment
tlhenvironment

Reputation: 349

The pacman package offers an efficient way to install / load packages in a single line. You can refer to this article. I'm not aware of a way that installs packages completely automatically, as there might be namespace overlap between functions, etc...

Upvotes: 1

Related Questions