appendObs | R Documentation |
This function joins two data frames of CRHM obs. The data frames must have the same number of columns, and the variables must be in the same order. The usual reason is for joining two data frames of differing periods. The primary and secondary data frames may be of any time periods. Where there are two values for a given datetime, the primary values are used. Rows of missing values at the beginning and end of the time series are deleted.
appendObs(primaryObs, secondaryObs, trim = TRUE, quiet = TRUE, logfile = "")
primaryObs |
Required. The primary CRHMr data frame of obs values. |
secondaryObs |
Required. The secondary obs data frame. Note that both data frames must have the same time intervals. |
trim |
Optional. If set to |
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, returns a data frame of values combined from the primaryObs
and secondaryObs
data frames. If unsuccessful, returns an error.
In addition to the usual notation in the logfile, this function also writes a separate
file which summarises the new data frame. The summaries are also printed to the screen,
if quiet=FALSE
, the logfile
also contains a complete listing of the source
of each value in the infilled data frame. Each value is listed as being primary
(from the primaryObs
data frame), secondary (derived from the
secondaryObs
data frame) or NA (missing).
Kevin Shook
## Not run:
broadview <- appendObs(broad2855, broad2856)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.