数据框1:
> head(bvg1_weather)
month year rainfall_mm
1 Jan 1910 152.8
2 Jan 1911 96.2
3 Jan 1912 126.8
4 Jan 1913 125.0
5 Jan 1914 135.0
6 Jan 1915 147.1
Dataframe 2:
> head(p2p_dt_SKILL_A)
EOD_FWIH_A ASST_RT_MWF ASST_RT_MA ASST_RT_DL ASST_RT_A month year
1 1.20 0.03 0.08 1.00 0.76 Nov 2015
2 1.20 0.03 0.20 1.47 1.42 Nov 2015
3 1.20 0.09 0.13 1.01 0.82 Nov 2015
4 1.22 0.13 0.08 1.04 0.79 Nov 2015
5 1.20 0.00 0.00 0.77 0.53 Nov 2015
6 1.20 0.00 0.17 1.16 0.87 Nov 2015
我想根据月份和年份加入这两个。
我尝试dplyr inner_join
但收到错误:
> inner_join(p2p_dt_SKILL_A, bvg1_weather, by=c("month","year"))
Error in withCallingHandlers(tryCatch(evalq((function (..., call. = TRUE, :
object '.rcpp_warning_recorder' not found
Error: cannot join on columns 'month' x 'month'
任何想法?