findGaps | R Documentation |
Finds successive missing values in an obs data frame. This function is useful to show where data are missing, before you use the interpolate
or impute
functions. All of the gaps in each variable are written to a .csv file.
findGaps(obs, gapfile = "", minlength = 1, quiet = TRUE, logfile = "")
obs |
Required. A CRHMr data frame containing obs values. |
gapfile |
Optional. The name of the output file. If omitted the output file will be the name of the obs data frame, followed by _gaps.csv. |
minlength |
The minimum gap length included in the analysis (in time steps). Default is 1 time step. |
quiet |
Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, and there are gaps, returns TRUE
. If successful, and there are no gaps, returns 'No gaps. If unsuccessful, returns FALSE
.
If quiet=FALSE, the functions gives a summary of the gaps (number of gaps, their total length) for each year.
Kevin Shook
insertMissing
interpolate
impute
findGaps(BadLake7376, quiet = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.