R For SAS Users
Melinda Higgins, PhD
Research Professor/Senior Biostatistician Emory University
R
is FREE. Free as in no cost and free as in open source licensingR
's popularity is growing rapidly $^1$R
have now surpassed those for SAS
R
appears to now be more commonly reported in scholarly articles than SAS
R
installation is small (usually <100MB)R
is FREE?
ls()
lists all data and related objects loaded in R
session's global environment
load()
loads datasets in .RData
binary formatUsually there are no objects in the global environment at the beginning of a new R session.
ls()
character(0)
# Load the abalone dataset
load("abalone.RData")
# List the objects in memory
ls()
"abalone"
help()
provides access to documentation for any function or package installedhelp(ls)
sessioninfo()
provides details on computer system and packages loadedlibrary()
is used to load packages during your R
sessionR
packages are available and increasing everyday $^1$sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
# Load the dplyr package and run sessionInfo again
library(dplyr)
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
... some output removed ...
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached base packages:
[1] dplyr_0.7.7
R For SAS Users