사례 연구: R로 도시 시계열 데이터 분석
Lore Dirick
Manager of Data Science Curriculum at Flatiron School
periodicity(temps_xts)
2007-01-01부터 2015-12-31까지 일간 주기
periodicity(flights_xts)
2010-01-01부터 2015-12-01까지 월간 주기
temps_xts_2 <- temps_xts["2010/2015"]
temps_monthly <- to.period(temps_xts_2,
period = "months")
merge()의 인자 순서가 열 순서를 결정flights_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
사례 연구: R로 도시 시계열 데이터 분석