Displaying 1 result from an estimated 1 matches for "lb4".
Did you mean:
lb
2012 May 31
2
Loop question
...al variables according to the loop presented below (data
attached).
Lx <- read.csv("Lx.csv", header=T, sep=",")
for (i in 1:20) {
Lx$sb1[i] <- Lx$Lb1[i+1]/Lx$Lb1[i]
Lx$sb2[i] <- Lx$Lb2[i+1]/Lx$Lb2[i]
Lx$sb3[i] <- Lx$Lb3[i+1]/Lx$Lb3[i]
Lx$sb4[i] <- Lx$Lb4[i+1]/Lx$Lb4[i]
Lx$sb5[i] <- Lx$Lb5[i+1]/Lx$Lb5[i]
Lx$sw1[i] <- Lx$Lw1[i+1]/Lx$Lw1[i]
Lx$sw2[i] <- Lx$Lw2[i+1]/Lx$Lw2[i]
Lx$sw3[i] <- Lx$Lw3[i+1]/Lx$Lw3[i]
Lx$sw4[i] <- Lx$Lw4[i+1]/Lx$Lw4[i]
Lx$sw5[i] <- Lx$Lw5[i+1]/Lx$Lw5[i]
}
How I could also create the variabl...