Ein kleines Beispiel, wie sich Eurostat-Daten direkt in R einlesen lassen...
##### Getting Data #####
library(SmarterPoland)
View(grepEurostatTOC("Health"))
health = getEurostatRaw("hlth_hlye")
View(health)
View(grepEurostatTOC("working hours"))
wh = getEurostatRaw("lfso_04vawkhwus")
View(wh)
wh.sub = wh[101,]
View(wh.sub)
health = subset(health, grepl("F_0_DFLE,", health[,1]))
dim(health)
health = health[, c(1,10)]
View(health)
health[,1]=sub("F_0_DFLE,", "" , health[,1])
colnames(wh.sub) = sub(" ", "", colnames(wh.sub))
health$wh=NA
for(i in 1:dim(health)[1]){
if (any(colnames(wh.sub)==health[i,1]))
health$wh[i] = wh.sub[1, which(colnames(wh.sub)==health[i,1])]
}
Kommentare
Kommentar veröffentlichen