SHARE
TWEET

Untitled

a guest Jun 15th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. T item V1
  2. 1 a      2
  3. 2 a      5
  4. 1 b      1
  5. 2 b      2
  6.      
  7. T item V1
  8. 1 a       2
  9. 2 a       6
  10.      
  11. df1 %>%
  12.   left_join(df2, by = c("T", "item")) %>%
  13.   mutate(
  14.     V1 = coalesce(as.numeric(V1.y), as.numeric(V1.x))
  15.   ) %>%
  16.   select(-V1.x, V1.y)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top