Skip to content
Back to formatted view

Raw Message

Message-ID: <200210231354.50052.dwartel@ulb.ac.be>
Date: 2002-10-23T11:54:50Z
From: David Wartel
Subject: Counting NA?
In-Reply-To: <20021023064820.GA1296@komensky.surfbest.net>

Surely not the best method:
length(which(is.na(data$S2)==TRUE))


On Wednesday 23 October 2002 08:48, Matej Cepl wrote:
> 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

-- 
David Wartel

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._