Displaying 1 result from an estimated 1 matches for "snlf1".
2018 Jan 20
1
a vector unusually getting NA values.....
...k <- 1; i <- 1
for(j in 1:length(snl)){
if(snl[[j]] == "condition") {
k[i] <- j
i <- i+1}
}
snlf1 <- snl[k]
return(snlf1)
}
The problem is, if we test the function by returning the vector k, it, (k), is getting NA values. i.e, instead of skipping the values of j for which the condition is false, k is getting populated by NA values. k is getting the following values (for a given s...