Casestudy: Tijdreeksgegevens van een stad analyseren in R
Lore Dirick
Manager of Data Science Curriculum at Flatiron School
periodicity(temps_xts)
Dagelijkse periodiciteit van 2007-01-01 tot 2015-12-31
periodicity(flights_xts)
Maandelijkse periodiciteit van 2010-01-01 tot 2015-12-01
temps_xts_2 <- temps_xts["2010/2015"]
temps_monthly <- to.period(temps_xts_2,
period = "months")
merge() bepaalt kolomvolgordeflights_temps <- merge(flights_xts, temps_monthly)head(flights_temps)
flights temps
2010-01-01 8912 36.12903
2010-02-01 8418 37.71429
2010-03-01 9637 42.22581
2010-04-01 9363 51.26667
2010-05-01 9360 56.87097
2010-06-01 9502 63.56667
Casestudy: Tijdreeksgegevens van een stad analyseren in R