How to find installed R version from RStudio

How to find the version of R using version command
How to find the version of R using version command

In this tutorial, you will learn three different ways to identify the version of R installed in your computer.

Find R version from console after opening RStudio

One of the ways to find the R version that you are using is to look at the console when you open R either using R app or RStudio app. Here is the scree shot of R console with R version information when you open RStudio. The first line contains the R version information. In this example

R version 4.0.3 (2020-10-10)  -- "Bunny-Wunnies Freak Out"
Find R version from console after opening R Studio

Find R version using R.version command

We can find the version of R installed in the current R session using R.session command on the console. R.version gives you information about the computer you are using and the version of R you are using.

R.version

platform       x86_64-apple-darwin17.0     
arch           x86_64                      
os             darwin17.0                  
system         x86_64, darwin17.0          
status                                     
major          4                           
minor          0.3                         
year           2020                        
month          10                          
day            10                          
svn rev        79318                       
language       R                           
version.string R version 4.0.3 (2020-10-10)
nickname       Bunny-Wunnies Freak Out     

Screenshot of R.version command on RStudio

Here is the screenshot of the console when you R.version command from RStudio.

Find the version R using R.version function in Rstudio console

Find R version using version command

Another version R.version command is “version command. The output from version is exactly the same as R.version. version command gives you information about the computer you are using and the version of R you are using.

version

platform       x86_64-apple-darwin17.0     
arch           x86_64                      
os             darwin17.0                  
system         x86_64, darwin17.0          
status                                     
major          4                           
minor          0.3                         
year           2020                        
month          10                          
day            10                          
svn rev        79318                       
language       R                           
version.string R version 4.0.3 (2020-10-10)
nickname       Bunny-Wunnies Freak Out     

Screenshot of version command on RStudio
How to find the version of R using version command

sessionInfo() to find the version of R

The function sessionInfo() gives information about the current R Session including the version of R you are using and the loaded packages.

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.0.3 tools_4.0.3  

Screenshot of sessionInfo() command on RStudio
Find the version of R you are using with sessionInfo()

Exit mobile version