|
|
@@ -1,8 +1,3 @@
|
|
|
-# For loop to add 1.1m to all the data of AnkleLeft.y to determine real height.
|
|
|
-#for (j in 1:(nrow(DATA))) {
|
|
|
-# DATA$AnkleLeft.y + 1.1
|
|
|
-#}
|
|
|
-
|
|
|
plot(DATA[patient$WALKING,]$AnkleLeft.y,
|
|
|
type = "l",
|
|
|
ylab = "Hoogte",
|
|
|
@@ -13,7 +8,7 @@ par(new=TRUE)
|
|
|
plot(DATA[patient$WALKING,]$AnkleRight.y,
|
|
|
type = "l",
|
|
|
ylab = "Hoogte",
|
|
|
- col = ifelse(DATA$AnkleRight.y > -1.1, "orange", "purple"),
|
|
|
+ col = ifelse(DATA$AnkleRight.y > -1.1, "blue", "purple"),
|
|
|
ylim = c(-1.15, -0.9)
|
|
|
)
|
|
|
|
|
|
@@ -22,7 +17,7 @@ meanLine <- mean(DATA[patient$WALKING,]$AnkleLeft.y)
|
|
|
|
|
|
##-LEFT-##
|
|
|
#Creates vector which contains the values above the mean height (1e quarter)
|
|
|
-Q1 <- c()
|
|
|
+Q1 <- NULL
|
|
|
for(i in patient$WALKING){
|
|
|
if (DATA[i,]$AnkleLeft.y > meanLine){
|
|
|
Q1 <- c(Q1, DATA[i,]$AnkleLeft.y)
|
|
|
@@ -33,7 +28,7 @@ for(i in patient$WALKING){
|
|
|
meanQ1 <- mean(Q1)
|
|
|
|
|
|
#Creates vector which containts the values under the mean height value (3e quarter)
|
|
|
-Q3 <- c()
|
|
|
+Q3 <- NULL
|
|
|
for(i in patient$WALKING){
|
|
|
if(DATA[i,]$AnkleLeft.y < meanLine){
|
|
|
Q3 <- c(Q3, DATA[i,]$AnkleLeft.y)
|
|
|
@@ -48,7 +43,7 @@ DiffAnkleLeft <- abs(meanQ3 - meanQ1)
|
|
|
|
|
|
##-RIGHT-##
|
|
|
#Creates vector which contains the values above the mean height (1e quarter)
|
|
|
-Q1 <- C()
|
|
|
+Q1 <- NULL
|
|
|
for(i in patient$WALKING){
|
|
|
if(DATA[i,]$AnkleRight.y > meanLine){
|
|
|
Q1 <- c(Q1, DATA[i,]$AnkleRight.y)
|
|
|
@@ -59,7 +54,7 @@ for(i in patient$WALKING){
|
|
|
meanQ1 <- mean(Q1)
|
|
|
|
|
|
#Creates vector which contains the values above the mean height (3e quarter)
|
|
|
-Q3 <- c()
|
|
|
+Q3 <- NULL
|
|
|
for(i in patient$WALKING){
|
|
|
if(DATA[i,]$AnkleRight.y < meanLine){
|
|
|
Q3 <- c(Q3, DATA[i,]$AnkleRight.y)
|
|
|
@@ -76,14 +71,24 @@ DiffAnkleRight
|
|
|
|
|
|
if(DiffAnkleLeft < 0.05 || DiffAnkleRight < 0.05){
|
|
|
print("The patient barely lift his foot up, there is a potentional falling risk")
|
|
|
-}
|
|
|
-else {
|
|
|
+}else {
|
|
|
print("The patient walks just fine according his ankles")
|
|
|
- }
|
|
|
+}
|
|
|
|
|
|
#Creates Smoothline of the left ankle
|
|
|
SmoothAnkleLeft <- smooth.spline(DATA[patient$WALKING,]$AnkleLeft.y, spar=0.35)
|
|
|
-lines(SmoothAnkleLeft, col = "green")
|
|
|
+plot(SmoothAnkleLeft, col = "green",
|
|
|
+ type = "l",
|
|
|
+ ylim = c(-1.17, -0.9),
|
|
|
+ ylab = "Hoogte",
|
|
|
+ xlab = "Index")
|
|
|
|
|
|
+
|
|
|
+par(new=TRUE)
|
|
|
SmoothAnkleRight <- smooth.spline(DATA[patient$WALKING,]$AnkleRight.y, spar=0.35)
|
|
|
-lines(SmoothAnkleRight, col = "purple")
|
|
|
+plot(SmoothAnkleRight, col = "blue",
|
|
|
+ type = "l",
|
|
|
+ ylim = c(-1.17, -0.9),
|
|
|
+ ylab = "Hoogte",
|
|
|
+ xlab = "Index")
|
|
|
+
|