Finds the number of valid (non-NA) values in a vector.
Author
Derek H. Ogle, DerekOgle51@gmail.com
Examples
junk1 <- c(1,7,2,4,3,10,NA)
junk2 <- c("Derek","Hugh","Ogle","Santa","Claus","Nick",NA,NA)
junk3 <- factor(junk2)
junk4 <- c(TRUE,TRUE,FALSE,FALSE,FALSE,TRUE,NA,NA)
junk5 <- data.frame(junk1)
junk6 <- data.frame(junk3)
validn(junk1)
#> [1] 6
validn(junk2)
#> [1] 6
validn(junk3)
#> [1] 6
validn(junk4)
#> [1] 6
validn(junk5)
#> [1] 6
validn(junk6)
#> [1] 6