setWhereMeasured {photobiology}R Documentation

Set the "where.measured" attribute

Description

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

Usage

setWhereMeasured(x, where.measured, lat, lon, ...)

## Default S3 method:
setWhereMeasured(x, where.measured, lat, lon, ...)

## S3 method for class 'generic_spct'
setWhereMeasured(x, where.measured = NA, lat = NA,
  lon = NA, ...)

## S3 method for class 'summary_generic_spct'
setWhereMeasured(x, where.measured = NA,
  lat = NA, lon = NA, ...)

## S3 method for class 'generic_mspct'
setWhereMeasured(x, where.measured = NA, lat = NA,
  lon = NA, ...)

Arguments

x

a generic_spct object

where.measured

A one row data.frame such as returned by function geocode from package 'ggmap' for a location search.

lat

numeric Latitude in decimal degrees North

lon

numeric Longitude in decimal degrees West

...

Allows use of additional arguments in methods for other classes.

Value

x

Methods (by class)

Note

This method alters x itself by reference and in addition returns x invisibly. If x is not a generic_spct or an object of a class derived from generic_spct, x is not modified. If where 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).

Method for collections of spectra recycles the location information only if it is of length one.

See Also

Other measurement metadata functions: getInstrDesc, getInstrSettings, getWhatMeasured, getWhenMeasured, getWhereMeasured, get_attributes, isValidInstrDesc, isValidInstrSettings, setInstrDesc, setInstrSettings, setWhatMeasured, setWhenMeasured, trimInstrDesc, trimInstrSettings


[Package photobiology version 0.9.21 Index]