SelectByInvertedDate: Utility function to make it easier to remove select periods...

View source: R/InvertedSelectByDate.R

SelectByInvertedDateR Documentation

Utility function to make it easier to remove select periods from a data frame

Description

Utility function to make it easier to remove select periods from a data frame

Usage

SelectByInvertedDate(
  mydata,
  start = "1/9/2008",
  end = "30/9/2008",
  year,
  month,
  day,
  hour,
  incert_na = TRUE,
  verbose = T
)

Arguments

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

Examples

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)


Schuch666/hackWRF documentation built on June 9, 2025, 1:46 p.m.