-
Notifications
You must be signed in to change notification settings - Fork 0
Home
doesmindmatter edited this page Nov 25, 2014
·
1 revision
author: Ryan Mears date: March 24, 2014 transition: linear
Working with data in R with the RStudio GUI
- Get and Shape data into tidy arrangements
- Analyze and Summarize data with R packages
- Explore and Present with data visualization and publication quality tables and plots
type: section
Install [R][R-prog] [R-Prog]: http://cran.us.r-project.org/
![The R Foundation for Statistical Computing][cranr] [cranr]: NDL_R_tutorial-figure/CranR.png "The R Foundation for Statistical Computing"
Install [RStudio][RS-Prog] [RS-Prog]: http://www.rstudio.com/ide/download/desktop
![RStudio][cranr] [cranr]: NDL_R_tutorial-figure/rstudio-mac.png "RStudio"
type: section
- read.csv()
getwd()
- source()
getwd()
-
data types
- vectors
- arrays and matrices
- data frames
- lists
- functions
x <- seq_len(6)
subjs <- c(hc_subjs,sz_subjs)
cbind(x,subjs)
- cbind()
hc_2 <- cbind(hc_subjs,"hc")
sz_2 <- cbind(sz_subjs,"sz")
sz_2
- rbind()
grp_subjs <- rbind(hc_2,sz_2)
colnames(grp_subjs)<-c("subj","group")
grp_subjs
- print()
print(hc_subjs)
- length()
length(hc_subjs)
- dim()
dim(grp_subjs)
- str()
str(grp_subjs)
- Indices
grp_subjs[1,1]
grp_subjs[1,]
- Booleans
grp_subjs[,2]=='hc'
- grep(), grepl(), gsub(), substr()
- paste(), paste0(), cat()
- join()
- expand.grid()
- filter()
- select()
- reshape()
- melt()
- cast()
- **ply()
type: section
- mutate()
- ttest()
- ezANOVA()
plot(cars)
type: section
- plot()
- ggplot()
- ggvis()
- stargazer()
- knit()
type: subsection
- Webpages
- Books