The function finds the folders where there are R installations. This is important for deciding what to uninstall, and where from and to to move libraries. This function ignores installations of R-devel at this point. Also, this function is based on only looking at the folders above the current installation of R. If there are other installations of R outside the above folder, they will not be listed.

get.installed.R.folders(sort_by_version = TRUE, add_version_to_name = TRUE)

Arguments

sort_by_version

should the returned vector be sorted by the version number? (default is yes - so that the first element is of the newest version of R) should the user be given the option to choose between which two libraries to copy the packages? If FALSE (default), the folders are copied from the before-newest R installation to the newest R installation.

add_version_to_name

should the version number be added to the vector of folders? (default is yes)

Value

Returns a character vector (possibly named, possibly sorted) of the folders where there are R installations.

See also

Examples

if (FALSE) { get.installed.R.folders() # returns the sorted and named vector of # folder names where R is installed (in different versions). # The first element is # the folder of the newest version of R. get.installed.R.folders(F, F) # returns the folder names where R is # installed (in different versions) - no sorting of # the folder names was performed }