Description Usage Arguments Value Examples
This function complete non-reported dates and assign NA_real_
as their value.
1 | fill_serie(df, colName, timeStep)
|
df |
data frame with date and numeric vector as first and second column respectively. |
colName |
output colname of the numeric variable, e.g.: 'Qmd(m3/s)'. |
timeStep |
character with a valid time step: 'day', 'month', '4h', 'day/3', 'hour'. |
A data frame with missing time steps filled with NA's.
1 2 3 4 5 6 7 8 | # Create a data frame
dates <- seq.Date(from = as.Date('1990-01-01'), to = as.Date('1990-12-01'), by = 'm')
met_var <- runif(n = 12, 0, 10)
met_serie <- data.frame(dates, met_var)
# Fill serie
met_fill <- fill_serie(df = met_serie, colName = 'Temp', timeStep = 'day')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.