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