Installation directory of R and the usage of .libPath()

r

Solution

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

Problem

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?

Original source