50 likes | 199 Views
R libraries. How to download, install, and attach. Download & Install. Click “Packages > Install package(s)... Choose CRAN mirror site closer is better USA (NC) or USA(PA1) recommended Scroll through to find package e.g., Design (useful package for ROC curves, etc.)
E N D
R libraries How to download, install, and attach
Download & Install • Click “Packages > Install package(s)... • Choose CRAN mirror site • closer is better • USA (NC) or USA(PA1) recommended • Scroll through to find package • e.g., Design (useful package for ROC curves, etc.) • e.g., MPV (datasets for the MPV homeworks) • Double-click on package to install
Other options • You can save library as zip file and then install • Why? • you have a copy of it for later use • it will be on your computer if/when you upgrade your R to a new version • Update packages already installed • you can have R update all of your packages that are currently installed
Attaching library • Just because the library is installed does not mean you can use it. • You must “attach” it in every session that you want to use it. • Example: • lrm is in Design library • try typing lrm. R can’t find it. • need to attach library
Attaching library • library(Design) • lrm • library(help=Design) • library(MPV) • library(help=MPV) • data <- table.b1