View source: R/spct.metadata.r
| setWhereMeasured | R Documentation |
Method to set by reference the "where.measured" attribute of an R
object.
setWhereMeasured(x, where.measured, lat, lon, address, ...)
where_measured(x) <- value
## Default S3 method:
setWhereMeasured(x, where.measured, lat, lon, address, ...)
## S3 method for class 'generic_spct'
setWhereMeasured(x, where.measured = NA, lat = NA, lon = NA, address = NA, ...)
## S3 method for class 'summary_generic_spct'
setWhereMeasured(x, where.measured = NA, lat = NA, lon = NA, address = NA, ...)
## S3 method for class 'data.frame'
setWhereMeasured(x, where.measured = NA, lat = NA, lon = NA, address = NA, ...)
## S3 method for class 'generic_mspct'
setWhereMeasured(x, where.measured = NA, lat = NA, lon = NA, address = NA, ...)
x |
an R object |
where.measured, value |
A one row |
lat |
numeric Latitude in decimal degrees North. |
lon |
numeric Longitude in decimal degrees West. |
address |
character Human readable address. |
... |
Allows use of additional arguments in methods for other classes. |
x, with the "where.measured" attribute set.
setWhereMeasured(default): default
setWhereMeasured(generic_spct): generic_spct
setWhereMeasured(summary_generic_spct): summary_generic_spct
setWhereMeasured(data.frame): data.frame
setWhereMeasured(generic_mspct): generic_mspct
This method alters x itself by reference and in addition returns
x invisibly. If x is not an object of a supported class,
x is not modified. If the argument to where.measured 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). As with attr() passing NULL as argument for
parameter where.measured unsets the attribute.
Method for collections of spectra recycles the location information
only if it is a one row data.frame.
Other measurement metadata functions:
add_attr2tb(),
getFilterProperties(),
getHowMeasured(),
getInstrDesc(),
getInstrSettings(),
getSoluteProperties(),
getWhatMeasured(),
getWhenMeasured(),
getWhereMeasured(),
get_attributes(),
isValidInstrDesc(),
isValidInstrSettings(),
select_spct_attributes(),
setFilterProperties(),
setHowMeasured(),
setInstrDesc(),
setInstrSettings(),
setSoluteProperties(),
setWhatMeasured(),
setWhenMeasured(),
spct_attr2tb(),
spct_metadata(),
subset_attributes(),
trimInstrDesc(),
trimInstrSettings()
my.spct <- sun.spct
where_measured(my.spct)
where_measured(my.spct) <- data.frame(lon = 0, lat = -60)
where_measured(my.spct)
where_measured(my.spct) <- NULL
where_measured(my.spct)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.