View source: R/RMevents.plot.R
RMevents.plot | R Documentation |
Function to graph rainfall for a given x-day window around specified event periods
RMevents.plot( df, date = "pdate", rain = "rain", df.events, sdate = "StartDate", edate = "EndDate", depth = "depth", plot.buffer = 3, site.name = "" )
df |
dataframe with unit value rainfall data |
date |
string Date column in df as POSIX |
rain |
string Column in df with instantaneous rain values |
df.events |
dateframe with start and end dates/times for events |
sdate |
string Start date column in df.events rain file as POSIX |
edate |
string End date column in df.events rain file as POSIX |
depth |
string column in df.events with event rain depth |
plot.buffer |
numeric Used to define plotting window in days. Graphs will include data Time period preceding beginning of event for including in the graphs |
site.name |
string |
RDB <- CedarRRain RDB2 <- RMprep(RDB, prep.type = 1, date.type = 1, dates.in = "CST.Time", tz = "CST6CDT") RDB3 <- subset(RDB2, upload.ph3_site_basin_cedar_creek.Id.0....Geographical.Mean.kg.m.2. > -1) event.list <- RMevents(df=RDB3, ieHr=6, rainthresh=0.2, rain="upload.ph3_site_basin_cedar_creek.Id.0....Geographical.Mean.kg.m.2.") events.0.2 <- event.list$storms2 # pdf("events.pdf") RMevents.plot(RDB3,date="pdate", rain="upload.ph3_site_basin_cedar_creek.Id.0....Geographical.Mean.kg.m.2.", df.events=events.0.2,sdate="StartDate","EndDate",depth= "rain",plot.buffer=2, site.name="Example Site") # dev.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.