pastecs v1.4.2
first.Rd
Extract the first element of a vector. Useful for the turnogram() function
turnogram()
first(x, na.rm=FALSE)
a numerical vector
if na.rm=TRUE, then the first non-missing value (if any) is returned. By default, it is FALSE and the first element (whatever its value) is returned
na.rm=TRUE
a numerical value
Philippe Grosjean (phgrosjean@sciviews.org), Frédéric Ibanez (ibanez@obs-vlfr.fr)
last, turnogram
last
turnogram
a <- c(NA, 1, 2, NA, 3, 4, NA) first(a) #> [1] NA first(a, na.rm=TRUE) #> [1] 1