Guest User

Untitled

a guest
May 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Date time Range Waterconsumption
  2. 1/1/01 0300 31km 2.0liters
  3. 2/1/01 0800 30km 1.8liters
  4. 3/1/01 0300 33km 1.7liters
  5. 4/1/01 0600 32km 1.8liters
  6. 5/1/01 0800 28km 1.7liters
  7. 6/1/01 0300 35km 1.6liters
  8. 7/1/01 0800 31km 1.8liters
  9.  
  10. Date time heatlost weight
  11. 1/1/01 0300 0.27 61.5kg
  12. 2/1/01 0800 0.33 62.0kg
  13. 5/1/01 0800 0.69 61.7kg
  14. 6/1/01 0300 0.15 61.8kg
  15. 7/1/01 0800 0.63 62.0kg
  16.  
  17. set.seed(10)
  18. df1 <-
  19. data.frame(
  20. id = c(1:4),
  21. time = c(1:4),
  22. range = runif(4,0,1),
  23. watercon = runif(4,5,6)
  24. )
  25.  
  26. df2 <-
  27. data.frame(
  28. id = c(1,4),
  29. time = c(1,4),
  30. heatlost = c(11,7),
  31. weight = c(10,10)
  32. )
  33.  
  34. dplyr::left_join(df1, df2, "time")
  35.  
  36. 1 0.5074782 5.085136 1 11 10
  37. 2 0.3067685 5.225437 NA NA NA
  38. 3 0.4269077 5.274531 NA NA NA
  39. 4 0.6931021 5.272305 4 7 10
Add Comment
Please, Sign In to add comment