Answers for "install package in r"

11

r install package

# Basic syntax:
install.packages("package_you_want")

# To then use the package in R, you need to run:
library(package_you_want)
# Note, when you install a package, the package name has to be in quotes
#	but when you load it, it shouldn't be

# If your package isn't in the main CRAN repositry (which is rare), use:
install.packages("package_you_want", "https://other.repo.url.com")
# Where there other repo URL is the base URL of the other repository
Posted by: Guest on October-11-2020
0

how to make an r package that install its dependencies

install.packages("mypackage.tar.gz",type="source",dependencies=TRUE,repos="http://a.cran.mirror")
Posted by: Guest on October-15-2020
2

install package in r

#install (if not already installed) and load tseries package
if(!require(packageName)){install.packages('packageName')} else{library(packageName)}
Posted by: Guest on December-16-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language