Install packages
install.packages(“package”)
Loading a package
library(package)
See data
dataset %>% View()
View(), why using it?
to see data
helps you connect functions
%>%
%>%
helps you connect functions
Interested in only 1 variable of the dataset
dataset %>% select(variable)
dataset %>% select(variable)
Interested in only 1 variable of the dataset
If you want to select 1 variable and want to view it
starwars %>% select(height) %>% View()
helps you connect functions
%>%
library(package)
Loading a package
dataset %>% View()
See data
install.packages(“package”)
Install packages
what should be in your codebook?
1: variable name
2: values
3: measurement level
(op de x-as)
Explore variable in dataset
(mean, median, variation and standard deviation)
dataset %>% summary()
dataset %>% summary()
Explore variable in dataset
(mean, median, variation and standard deviation)
Explore 1 specific variable in dataset
(mean, median, variation and standard deviation)
dataset %>% select(variable) %>% summary()
RQ “What was the average poverty rate of countries in 2016”?
: Create a new dataset with cases with SUBJECT = “TOT” and TIME = 2016. Call it: poverty_2016
Poverty_2016 <- poverty %>%
Filter(SUBJECT == “TOT”, TIME == 2016)