2

Dataframe 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

I am trying to join the two based on month and year.

I tried dplyr inner_join but getting the error:

> 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'

any ideas?

Shery
  • 1,808
  • 5
  • 27
  • 51
  • 2
    The first thing I'd check is to make sure your dplyr is the latest version. – joran Dec 02 '15 at 22:58
  • it looks like a problem with `dplyr`. After doing what joran suggested, have a look at https://github.com/hadley/dplyr/issues/769 and https://github.com/hadley/dplyr/issues/455 – Alex Dec 02 '15 at 23:34
  • @Alex what are the other alternatives to join these two dataframes? – Shery Dec 03 '15 at 15:10
  • got it here: http://stackoverflow.com/questions/1299871/how-to-join-merge-data-frames-inner-outer-left-right – Shery Dec 03 '15 at 15:56

0 Answers0