15

If I want to know which directory is R installed, which R command is able to do that? The .libPaths() function gets/sets where packages are found. How does this differ with the installation directory of R?

1 Answer 1

26

You're looking for R.home(). See ?R.home for other uses, e.g. R.home("bin").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.