i have a data frame of one column with number in it (between 1 and 20), when i try to make a loop for i always get an error (condition have a length > 1) is there a way to fix it ? thanks in advance !
here is my code :
tab2 <- as.data.frame(tab1$nombre_total*tab1$nombre_total)
for (i in tab2) {
print(i)
if (i>10)
print("ok")
}
Expecting "ok" to show at least one time, but get a message error