Introduction Flashcards
Workflow
Question
Expectation
Planned Presentation/analysis
Selection of subjects
How will data be collected
Ethics/permission
Data collection
Data wrangling (tidying/cleaning)
Visualization
Statistical tests
Critical thinking
Report/communicate
R überblick
rm(list = ls())
Read.csv()
File.choose()
Str()
Summary()
Glimpse()
Skim()
Table()
Names()
dd %>% group_by(gender) %>% summarise(number = n()) (= # of observations of each gender)
ggplot()
dd %>% filter(…>50, …<500)
Data
Select() = select columns
Slice() = select rows
Mutate() = create new variable
Filter() = select subset of rows
Arrange() = sorting/order rows
Names() = give names to columns
With()
Group_by()
Transform() = add column
Aggregate() =
Tapply()
Join() = merge 2 datasets
Unique() = selects unique values
Ggplot
Ggplot(dd, aes(x=…,y=…., colour/shape=…))+
Geom_point()
Geom_histogram() + facet_wrap()
Geom_boxplot()