hyet_create uses precipitation and date values to
create a tibble that represents the distribution of rainfall over time.
Returns an error if:
prec and date values don't have the same length.
prec is not a numeric vector.
date is not a POSIXct (times) vector.
hyet_create(date, prec)
| date | a numeric vector of precipitation values |
|---|---|
| prec | a POSIXct vector with date values |
a tibble with the variables date and prec
This function checks the validity of precipitation and date values and returns an error if:
These vectors don't have the same length,
precipitation is not numeric or
date is not POSIXct.
# create date and precipitation values date <- seq(from = as.POSIXct(0, origin = "2018-01-01"), length.out = 100, by = "mins") set.seed(1) prec <-round(runif(100,0,10),1) # create hyetograph hyet <- hyet_create(date, prec)