How to find the R version you are using?

R ProgrammingServer Side ProgrammingProgramming

Most of the times, we need to use packages in R and some packages are restricted to different versions in R, generally to newer versions. Therefore, we might need to find which version of R we are using. To find the R version, we can directly use the command R.Version().

Example

Live Demo

R.Version()

Output

$platform [1] "x86_64−w64−mingw32"$arch
[1] "x86_64"
$os [1] "mingw32"$system
[1] "x86_64, mingw32"
$status [1] ""$major
[1] "4"
$minor [1] "0.2"$year
[1] "2020"
$month [1] "06"$day
[1] "22"
$svn rev [1] "78730"$language
[1] "R"
$version.string [1] "R version 4.0.2 (2020−06−22)"$nickname
[1] "Taking Off Again"

We can also use the command R.version.string for the same purpose as shown below −

Example

Live Demo

R.version.string

Output

[1] "R version 4.0.2 (2020−06−22)"
Published on 08-Feb-2021 11:45:05