doubleMass | R Documentation |
Calculates cumulative sums for two variables and optionally returns a plot. Only values coinciding in time are used for the cumulative sums.
doubleMass(
primaryObs,
primaryCol = 1,
secondaryObs,
secondaryCol = 1,
plot = TRUE,
logfile = ""
)
primaryObs |
Required. The primary CRHMr data frame of obs values. |
primaryCol |
Optional. The column number to be used, not including the datetime. If not specified, defaults to the first column. |
secondaryObs |
Required. The secondary CRHMr data frame of obs values. |
secondaryCol |
Optional. The column number to be used, not including the datetime. If not specified, defaults to the first column. |
plot |
Optional. Should a plot be created? Default is |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If plot = TRUE
, then a ggplot2 object will be returned, with the
primaryObs
values plotted on the x-axis and the secondaryObs
values
plotted on the y-axis. Otherwise, a dataframe is returned with the cumulative values of
each of the variables.
Kevin Shook
## Not run:
p <- doubleMass(primaryObs=CamrosePPT, secondaryObs=WetaskiwinPPT, plot=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.