Guest User

Untitled

a guest
May 27th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. cell_id x y year percentpp
  2. 1 250540 170.75 -83.75 2011 3
  3. 2 250541 171.25 -83.75 2011 1
  4. 3 250542 171.75 -83.75 2011 0
  5. 4 250543 172.25 -83.75 2011 0
  6. 5 250540 170.75 -83.75 2012 1
  7. 6 250541 171.25 -83.75 2012 5
  8. 7 250542 171.75 -83.75 2012 1
  9. 8 250543 172.25 -83.75 2012 5
  10. 9 250540 170.75 -83.75 2013 2
  11. 10 250541 171.25 -83.75 2013 2
  12. 11 250542 171.75 -83.75 2013 2
  13. 12 250543 172.25 -83.75 2013 0
  14. 12 250540 170.75 -83.75 2014 2
  15. 13 250541 171.25 -83.75 2014 3
  16. 14 250542 171.75 -83.75 2014 3
  17. 15 250543 172.25 -83.75 2014 3
  18.  
  19. cell_id x y year percentpp
  20. 1 250540 170.75 -83.75 2011 3
  21. 2 250541 171.25 -83.75 2011 1
  22. 3 250542 171.75 -83.75 2011 0
  23. 4 250543 172.25 -83.75 2011 0
  24. 5 250540 170.75 -83.75 2012 3
  25. 6 250541 171.25 -83.75 2012 5
  26. 7 250542 171.75 -83.75 2012 1
  27. 8 250543 172.25 -83.75 2012 5
  28. 9 250540 170.75 -83.75 2013 3
  29. 10 250541 171.25 -83.75 2013 5
  30. 11 250542 171.75 -83.75 2013 2
  31. 12 250543 172.25 -83.75 2013 5
  32. 13 250540 170.75 -83.75 2014 3
  33. 14 250541 171.25 -83.75 2014 5
  34. 15 250542 171.75 -83.75 2014 3
  35. 16 250543 172.25 -83.75 2014 5
  36.  
  37. function(x) {
  38. if df$percentpp[year+1,] is greater than df$percentpp[year,]
  39. when cell_id$year = cell_id$year+1
  40. then df$percentpp[year,] <- df$percentpp[year+1,]
  41. }
Add Comment
Please, Sign In to add comment