# A test fn that takes a vector as input, # loops through its elements, puts the results of a logical test # in a new vector and returns the result simpleReturn<-function(v){
l<-length(v)
r<-vector(mode="logical", length=l)
for (index in 1:l) {
r[index]<-v[index] > 2 }
return(r)
}
v<-c(1:10)
dx<-simpleReturn(v)
dx