More about this website.
read_spss(){haven}
Read spss files via haven (DIE HIER EHER DATAMANAGEMENT)
ess <- read_spss(file = "data/ESS7e02_1.sav",
user_na = TRUE)
read_dta(){readstata13}
Read dta files
lala <- read_dta(file = "blabla",version = 13)
within(data,{befehl})
Execute r command within data environment. Returns modified dataset.{}
make sure that commands are executed across several lines.
data(iris)
summary(iris$Sepal.Length)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 4.300 5.100 5.800 5.843 6.400 7.900
iris <- within(iris,{
Sepal.Length <- Sepal.Length + 10
})
summary(iris$Sepal.Length)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 14.30 15.10 15.80 15.84 16.40 17.90
table(x)
prop.table()
summary(x)
mean(x)
sum(x)
sd(x)
median(x)
round(2)
factor()