View source: R/InvertedSelectByDate.R
SelectByInvertedDate | R Documentation |
Utility function to make it easier to remove select periods from a data frame
SelectByInvertedDate(
mydata,
start = "1/9/2008",
end = "30/9/2008",
year,
month,
day,
hour,
incert_na = TRUE,
verbose = T
)
mydata |
A data frame containing a date field in hourly or high resolution format. |
start |
A start date string in the form d/m/yyyy e.g. “1/2/1999” or in ‘R’ format i.e. “YYYY-mm-dd”, “1999-02-01” |
end |
See start for format. |
year |
not used at the moment |
month |
not used at the moment |
day |
not used at the moment |
hour |
not used at the moment |
incert_na |
incert a NA between between the two parts |
verbose |
to display additional information |
model <- readRDS(paste0(system.file("extdata",package="hackWRF"),"/model.Rds"))
plot(model$SAndre~model$date, ty = 'l', col = '#777777', lwd = 2)
model2 <- SelectByInvertedDate(model, start = '2012-01-03', end = '2012-01-05')
lines(model2$SAndre~model2$date, col = '#44AA44', lwd = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.