search for: sumyes

Displaying 2 results from an estimated 2 matches for "sumyes".

Did you mean: sumres
2008 Oct 03
1
Error message in ifthen else
Hi, I came across the below error when I try to do ifelse condition:- Error in "[<-"(`*tmp*`, test, value = rep(yes, length = length(ans))[test]) : incompatible types What I am trying to accomplish is :- for(x in 1:ncol(filterpred)){ sumno<-sum(filterpred[no,x]) sumyes<-sum(filterpred[yes,x]) ifelse(sumno==0 && sumyes !=0, filterpred[,x]<-NULL,filterpred[,x]<-filterpred[,x]) } Anything wrong here? Please advise. Thanks. [[alternative HTML version deleted]]
2002 Oct 23
7
Counting NA?
Hi, how to do quickly equivalent of the following? counter = 0 for(i in 1:length(data$S2)) { if(!is.na(data$S2[i])) { counter = counter + 1 } } I have imagined something like length(x,na.rm=TRUE). How can I get values usually taken from tables like z-score, values of t distribution etc.? I could not find them among values mentioned in info file. Thanks, Matej -- Matej Cepl,