I have one column of with 10000 rows, and I want to separate those numbers based on their density. So I use summary()
to see a big picture of it, but I got 6 numbers summary, the last one is NA's. But there shouldn't be any NAs, because this is a result of a for loop, and I already eliminate all "inf"s. How can I see where are these NAs and delete them?
Here is the result
summary(HOT$score)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
0.945 2.714 5.180 5.612 7.976 21.420 97
Thank you for any idea in advance.
Thanks to all commenters help, I found those NAs. But I can't figure out why it get NA.
This is a result of running max()
. say
c<-c(21:30)
d<-c(31:40)
bb<-as.data.frame(cbind(c,d))
h=42
max(bb$c[which(h<bb$c)])
[1] -Inf
Warning message:
In max(bb$c[which(h < bb$c)]) :
no non-missing arguments to max; returning -Inf
so if it doesn't have result, it will return -Inf, I don't know how the result would be NA.