trimObs: Trims a dataframe of missing values at the beginning and end

View source: R/trimObs.R

trimObsR Documentation

Trims a dataframe of missing values at the beginning and end

Description

Removes values before 01:00 on the first complete day of the data, and after 00:00 on the last complete rows. Because it is destructive, this command should only be used immediately before exporting observations to a CRHM .obs file. For daily obs, removes values before the first complete row and after the last complete row.

Usage

trimObs(obs, quiet = TRUE, logfile = "")

Arguments

obs

Required. A CRHMr obs dataframe.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns the trimmed dataframe. If unsuccessful, returns FALSE.

Author(s)

Kevin Shook

See Also

writeObsFile

Examples

BadLake.trimmed <- trimObs(BadLake7376)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.