Hello, I had created a function and I aimed to verify if it complies with certain data and if it was, then it is stored in another variable.
Code:
data = c(12, 20, 11, 16, 18, 32, 22 , 8)
class = function(N){}
tabla1= c(1:8)
for (i in length(N)){
if (data[i]<21.78){
table1[i]= data[i]
}
}
return(table1)
}
dats <- class(10) # data no return