View source: R/mergeStatInfo.r
mergeStatInfo | R Documentation |
Merge PAWMAP station information into a data frame.
mergeStatInfo(
df,
by.y = "site_identifier",
filterNA = TRUE,
fields = c("site_identifier", "watershed", "subwat", "loc.lbl", "panel", "duration"),
renameStat = NULL
)
df |
A data frame with a station field |
by.y |
Name of station field, to be matched with site_identifier |
filterNA |
should stations w/o info be filtered? (A warning listing the unmatched stations is provided.) |
fields |
Fields to add from the station table |
renameStat |
Should the site_identifier field be renamed to station? (to match historical output) |
The original data frame merged with station info fields. The merge returns all rows of df even if there is no match, to indicate that there are stations in df not present in the station table.
df <- data.frame(site_identifier=unique(stationInfo$site_identifier),
result=rnorm(length(stationInfo$site_identifier)))
mergeStatInfo(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.