trim_data: Trim data to specified start and end datetimes

View source: R/trim_data.R

trim_dataR Documentation

Trim data to specified start and end datetimes

Description

Trim data to specified start and end datetimes

Usage

trim_data(
  dat.tidy,
  var.to.trim,
  start.datetime = min(dat.tidy$TIMESTAMP),
  end.datetime = max(dat.tidy$TIMESTAMP),
  sensors.to.trim = c("HOBO", "aquaMeasure", "VR2AR")
)

Arguments

dat.tidy

Data in a tidy format, as exported by the convert_to_tidydata() function.

var.to.trim

Variable to trim, e.g. "Temperature", "Dissolved Oxygen", or "Salinity".

start.datetime

A character string indicating the date and time that the sensor started reliably recording data, in one of the following orders: "ymd IMS p", "Ymd IMS p", "Ymd HM", "Ymd HMS", dmY IM p", "dmY IMS p".

end.datetime

A character string indicating the date and time the sensor stopped reliably recording data, in one of the following orders: "ymd IMS p", "Ymd IMS p", "Ymd HM", "Ymd HMS".

sensors.to.trim

Sensor type(s) for which to trim the data. Default is sensors.to.trim = c("HOBO", "aquaMeasure", "VR2AR").

Value

Returns tidy.data trimmed to start.datetime to end.datetime

Author(s)

Danielle Dempsey

See Also

Other format: convert_depth_to_ordered_factor(), convert_to_tidydata(), format_for_opendata()


Centre-for-Marine-Applied-Research/strings documentation built on Aug. 21, 2023, 8 a.m.