rawsDF_filterDate: Date filtering for _rawsDF_ objects

View source: R/rawsDF_filterDate.R

rawsDF_filterDateR Documentation

Date filtering for rawsDF objects

Description

Subsets a rawsDF object by date. This function always filters to day-boundaries.

Dates can be anything that is understood by lubridate::ymd() including either of the following recommended formats:

  • "YYYYmmdd"

  • "YYYY-mm-dd"

Usage

rawsDF_filterDate(
  rawsDF = NULL,
  startdate = NULL,
  enddate = NULL,
  days = NULL,
  weeks = NULL,
  timezone = NULL
)

Arguments

rawsDF

raws_timeseries object.

startdate

Desired start datetime (ISO 8601).

enddate

Desired end datetime (ISO 8601).

days

Number of days to include in the filterDate interval.

weeks

Number of weeks to include in the filterDate interval.

timezone

Olson timezone used to interpret dates.

Value

A subset of the given rawsDF object.

Note

The returned data will run from the beginning of startdate until the beginning of enddatei.e. no values associated with enddate will be returned.

See Also

rawsDF_filter

Examples


library(RAWSmet)

rawsObject <- example_cefa_Saddle_Mountain
rawsDF <- rawsObject %>% raws_toRawsDF()

data201708 <-
  rawsDF %>%
  rawsDF_filterDate(20170801, 20170901, timezone = "America/Los_Angeles")

head(data201708$data)



MazamaScience/RAWSmet documentation built on May 6, 2023, 6:57 a.m.