Skip to content
Prev 325560 / 398503 Next

Elementary Help

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

?sum(is.na(dat1$value))
#[1] 3
table(is.na(dat1$value))
#FALSE? TRUE 
#? 197???? 3 
A.K.
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?