Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

validn

Finds the number of valid (non-NA) values in a vector.


Description

Finds the number of valid (non-NA) values in a vector.

Usage

validn(object)

Arguments

object

A vector.

Value

A single numeric value that is the number of non-NA values in a vector.

IFAR Chapter

2-Basic Data Manipulations.

Author(s)

Derek H. Ogle, derek@derekogle.com

See Also

See valid.n in plotrix and nobs in gdata for similar functionality. See is.na for finding the missing values.

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)
validn(junk2)
validn(junk3)
validn(junk4)
validn(junk5)
validn(junk6)

FSA

Simple Fisheries Stock Assessment Methods

v0.8.32
GPL (>= 2)
Authors
Derek Ogle [aut, cre] (<https://orcid.org/0000-0002-0370-9299>), Powell Wheeler [aut], Alexis Dinno [aut] (Provided base functionality of dunnTest())
Initial release
2021-1-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.