View source: R/insertMissing.R
| insertMissing | R Documentation |
Many time series have missing rows. This function finds missing rows,
and adds rows with the appropriate datetime values and NA_real_ values for
all variables. Once the missing values have been added, you can use
interpolate or impute to infill them.
insertMissing(obs, quiet = TRUE, logfile = "")
obs |
Required. A CRHMr data frame containing obs values. |
quiet |
Optional. Suppresses display of messages, except for errors. If you
are calling this function in an R script, you will usually leave
quiet= |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful returns a modified version of the obs data frame with missing datetime values inserted. All of the missing variables in the inserted rows are replaced by NA_real_ values. If unsuccessful, returns the value FALSE.
This function should be used before doing interpolation or imputation of variables. Note that this function is also called by the function findGaps.
Kevin Shook
findGaps interpolate impute
BadLake.withmissing <- insertMissing(BadLake7376, quiet=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.