R_version_in_a_folder: Get the version of the R installed in a folder

View source: R/updateR.R

R_version_in_a_folderR Documentation

Get the version of the R installed in a folder

Description

Get the version of the R installed in a folder based on the structure of the filename README.R-... (where ... is a version number for R). This function helps detect the version number of an R installation even if the name of the folder is not standard. If multiple versions were installed, overwriting each other, the most recent is selected.

Usage

R_version_in_a_folder(folder)

Arguments

folder

The folder for which we wish to know the R version.

Value

Returns a character vector of the R version (or NA, if this is not an R installation folder)

See Also

get.installed.R.folders

Examples

## Not run: 
R_version_in_a_folder(folder = R.home()) 
# returns the version of the current R installation

## End(Not run)

installr documentation built on Nov. 13, 2022, 1:06 a.m.