Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. count Idf_Nr block
  2. 1 1233 B12
  3. 2 1233 B12
  4. 3 1446 B12
  5. 4 1446 B12
  6. 5 365 B12
  7. 6 365 B12
  8. 7 876 B12
  9. 8 876 B12
  10. 9 842 B12
  11. 10 842 B12
  12. 11 1092 B12
  13. 12 1092 B12
  14. 13 923 B12
  15. 14 923 B12
  16. 15 1266 B12
  17. 16 1266 B12
  18. 17 256 B12
  19. 18 256 B12
  20. 19 588 B12
  21. 20 588 B12
  22. 21 1074 B12
  23. 22 1074 B12
  24. 23 474 B12
  25. 24 474 B12
  26. 25 1421 B12
  27.  
  28. df.new = df[seq(1, nrow(df), 5), ]
  29.  
  30. newdf <- df[c(rep(FALSE,4),TRUE), ]
  31.  
  32. newdf <- df[c(TRUE,rep(FALSE,4)), ]
  33.  
  34. df %>%
  35. slice(which(row_number() %% 5 == 1))
  36.  
  37. count Idf_Nr block
  38. 1 1 1233 B12
  39. 2 6 365 B12
  40. 3 11 1092 B12
  41. 4 16 1266 B12
  42. 5 21 1074 B12
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement