Set the "when.measured" attribute

Share:

Description

Function to set by reference the "when" attribute of an existing generic_spct or an object of a class derived from generic_spct.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
setWhenMeasured(x, when.measured, ...)

## Default S3 method:
setWhenMeasured(x, when.measured, ...)

## S3 method for class 'generic_spct'
setWhenMeasured(x, when.measured = lubridate::now(tzone
  = "UTC"), ...)

## S3 method for class 'summary_generic_spct'
setWhenMeasured(x,
  when.measured = lubridate::now(tzone = "UTC"), ...)

## S3 method for class 'generic_mspct'
setWhenMeasured(x,
  when.measured = lubridate::now(tzone = "UTC"), ...)

Arguments

x

a generic_spct object

when.measured

POSIXct to add as attribute

...

Allows use of additional arguments in methods for other classes.

Value

x

Methods (by class)

  • default: default

  • generic_spct: generic_spct

  • summary_generic_spct: summary_generic_spct

  • generic_mspct: generic_mspct

Note

if x is not a generic_spct or an object of a class derived from generic_spct, x is not modified. If when is not a POSIXct object or NULL an error is triggered. A POSIXct describes an instant in time (date plus time-of-day plus time zone).

See Also

Other measurement metadata functions: getInstrDesc, getInstrSettings, getWhatMeasured, getWhenMeasured, getWhereMeasured, setInstrDesc, setInstrSettings, setWhatMeasured, setWhereMeasured

Examples

1
2
3
4
my.spct <- sun.spct
getWhenMeasured(my.spct)
setWhenMeasured(my.spct, lubridate::ymd_hms("2015-12-12 08:00:00"))
getWhenMeasured(my.spct)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.