SCS 2011: Statistical Analysis and Programming with R/1 Installing Packages.R

From Wiki1

Jump to: navigation, search
#
#  SCS 2011: Statistical Analysis and Programming with R
#  September-October 2011
#  
#  Installing a few packages to start
#

  # Installing packages on CRAN

  install.packages(c('car','Hmisc','rgl')) 

  # Installing private packages from a file on the web  
  
  download.file("http://blackwell.math.yorku.ca/R/spida.zip", "spida.zip")
  install.packages("spida.zip", repos = NULL)

  download.file("http://blackwell.math.yorku.ca/R/p3d.zip", "p3d.zip")
  install.packages("p3d.zip", repos = NULL)

# Installation only needs to be done once when you start using R and whenever you 
# upgrade to a new version

  
## Each time you use R, load the packages with:
  
  library(spida)  # note that car and lattice are loaded automatically
  library(p3d)     # note that a number of other packages get loaded at the same time
Personal tools