Learn R Programming

dateutils (version 0.1.5)

last_obs: Last observation

Description

Return the last finite observation of `x`

Usage

last_obs(x)

Arguments

x

data potentially with non-finite values

Value

The last finite observation

Examples

Run this code
# NOT RUN {
last_obs(c(NA,1,2,3,NA,5,NA,7,NA,NA)) ## 7
# }

Run the code above in your browser using DataLab