[R] Elementary Help

arun smartpink111 at yahoo.com
Tue Jun 18 16:32:56 CEST 2013

May be this helps:
dat1<- data.frame(ID=1:200,value=sample(c(5:200,NA),200,replace=TRUE))
#[1]  56 146 184
sum(which(is.na(dat1$value)))  #Not clear about the 2nd part of the question
#[1] 386

#[1] 3
#  197     3 

>I am totally new to R, therefore probably this question will be very 
easy for most of you. I have a range of values in a column ranging from 5 to 200. >Some of the values are missing, that is, not all student 
numbers are there. How do I find which are these missing numbers and 
obtain the sum of >these integers?

More information about the R-help mailing list