Description Usage Arguments Examples
This function allows you to generate a dataframe with a complete datesequence by filling up missing dates with rows filled with NAs
1 2 3 4 5 6 7 8 | complete_dateseq(
df,
timestep = NULL,
sample.size = 0.5,
datecol.name = NULL,
unit = "year",
verbose = F
)
|
df |
data.frame, a column of format Date or POSIXct has to be present |
timestep |
integer, number of seconds between each row in the data.frame. Optional, if not supplied this number is guessed which may take some time for large data.frames |
datecol.name |
string, optional name of the datecolumn, otherwise it will be detected automatically using rebecka::detect_datecol |
unit |
string, one of 'year' or 'day', start timestamp will be rounded down and end timestamp up to this unit and the sequence will then be filled from start to end |
verbose |
logical, if TRUE and timestep is not given the detected time resolution will be printed |
1 | complete_dateseq(df, format = 'Date', group.cols = 'st_id', unit = 'year')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.