Abteilung Grünland und Futterbau/Ökologischer Landbau

R Beispiel

SQLite Datenbankabfrage

library(RSQLite)
library(Hmisc)

drv <- dbDriver("SQLite")
tfile <- 'wetter.sqlite'
con <- dbConnect(drv, dbname = tfile)

rs <- dbSendQuery(con, "
select Station, round(TM) as TM, count(TM) as n from Wetter
where Station = 10035 and year > 2000
group by round(TM,0), Station")

TM <- fetch(rs, n = -1)

rs <- dbSendQuery(con, "
  select round(TM) as TM, count(TM) as n
  from Wetter
  where year > 2000 group by round(TM,0)"
)

TMall <- fetch(rs, n = -1)

TM_10035 <- subset(TM, Station==10035)

dbClearResult(rs)

par(mfrow = c(2,2))

plot(n ~ TM, TM_10035, type="l", main="Schleswig 1980-2010", tck = 1)
axis(1,at = seq(-18,32,2),  tck = 1, col.ticks="light gray",lwd.ticks="1")
Aktuelles

Lehre

Forschung und Publikationen

Links

  • Variationsstatistik Ethik Fachschaft Kompetenzzentrum Milch Abreifeprognose Silomais