ankle.R 732 B

12345678910111213141516171819202122232425262728293031
  1. library(dplyr)
  2. # For loop to add 1.1m to all the data of AnkleLeft.y to determine real height.
  3. #for (j in 1:(nrow(DATA))) {
  4. # DATA$AnkleLeft.y + 1.1
  5. #}
  6. lowestLeft <- min(DATA$AnkleLeft.y)
  7. lowestRight <- min(DATA$AnkleRight.y)
  8. highestLeft <- max(DATA$AnkleLeft.y)
  9. highestRight <- max(DATA$AnkleRight.y)
  10. VerschilLeft <- (lowestLeft - highestLeft)
  11. VerschilRight <- (lowestRight - highestRight)
  12. plot(DATA$AnkleLeft.y,
  13. type = "l",
  14. ylab = "Hoogte...",
  15. col = ifelse(DATA$AnkleLeft.y > -1.1, "green", "red"),
  16. ylim = c(-1.15, -0.80)
  17. )
  18. #par(new=TRUE)
  19. #plot(DATA$AnkleRight.y,
  20. # type = "l",
  21. # ylab = "Hoogte",
  22. # col = ifelse(DATA$AnkleRight.y > -1.1, "orange", "purple"),
  23. # ylim = c(-1.20, -0.8)
  24. #)