I am newbie to R and I think I previously installed R but not sure.
Is there any way to know whether R is installed in your system?
Type R --version at the linux command line. Note: it has to be capital R.
Maintenance of R Packages The other r-cran-* packages shipped with Ubuntu are installed into the directory /usr/lib/R/site-library.
Some systems are set up to have /usr/bin (the standard place for a system installation) ahead of /usr/local/bin (the default place for installation of R) in their default path, and some do not have /usr/local/bin on the default path.
On ubuntu I would typically use the which
command to check for existance of a program.
which
is a Unix command used to identify the location of executables. If the R executable is somewhere in the PATH
then it should return its location:
john@ubuntu:~$ which R
/usr/bin/R
Alternatively you can use the type
command:
john@ubuntu:~$ type R
R is /usr/bin/R
type
is a Unix command that describes how its arguments would be interpreted if used as command names.
failing R
being on the PATH
you could resort to locate
which would be faster then find
however it will most likely give you a large number of returns for R
so some filtering would be required:
john@ubuntu:~$ locate -b R | fgrep -w R/bin
/usr/lib/R/bin/R
/usr/lib/R/bin/REMOVE
/usr/lib/R/bin/Rcmd
/usr/lib/R/bin/Rd2pdf
/usr/lib/R/bin/Rdconv
/usr/lib/R/bin/Rdiff
/usr/lib/R/bin/Rprof
/usr/lib/R/bin/Rscript
/usr/lib/R/bin/exec/R
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With