data_coverage {sapfluxnetr} | R Documentation |
data coverage
Description
helper for sfn_metrics
Usage
data_coverage(x, timestep, period_minutes)
Arguments
x |
a vector, usually a variable in the sapflow or environmental data. |
timestep |
numeric value with the timestep in minutes |
period_minutes |
numeric value with the period in minutes |
Details
This helper function calculates the coverage percentage in a vector, and is designed to be used inside a dplyr summarise statement. It calculates the coverage as the percentage of no NAs in the expected length of the summarising period stated by the timestep.
Value
a single value (numeric) with the percentage of coverage for that variable
Examples
# data for one day, 60 minutes timestep (24 values) with a 75% of coberture
x <- rep(c(1,2,3,NA), 6)
data_coverage(x, 60, 1440) # 75
[Package sapfluxnetr version 0.1.4 Index]