Skip to contents

Method to read the "how.measured" attribute of an R object.

Usage

getHowMeasured(x, ...)

how_measured(x, ...)

# Default S3 method
getHowMeasured(x, ...)

# S3 method for class 'generic_spct'
getHowMeasured(x, ..., simplify = FALSE)

# S3 method for class 'summary_generic_spct'
getHowMeasured(x, ..., simplify = FALSE)

# S3 method for class 'data.frame'
getHowMeasured(x, ..., simplify = FALSE)

# S3 method for class 'generic_mspct'
getHowMeasured(x, ..., idx = "spct.idx", simplify = FALSE)

Arguments

x

an R object.

...

Allows use of additional arguments in methods for other classes.

simplify

logical If all members share the same attribute value return one copy instead of a data.frame.

idx

character Name of the column with the names of the members of the collection of spectra.

Value

character vector An object containing a verbal description of the data.

Methods (by class)

  • getHowMeasured(default): default

  • getHowMeasured(generic_spct): generic_spct

  • getHowMeasured(summary_generic_spct): summary_generic_spct

  • getHowMeasured(data.frame): data.frame

  • getHowMeasured(generic_mspct): generic_mspct

Note

The method for collections of spectra returns the a data frame with a column of character strings.

Examples

my.spct <- sun.spct
how_measured(my.spct)
#> [1] "Simulated using 'libRadtran'. Average for one hour, centred approximately on local solar noon."
how_measured(my.spct) <- "Simulated with a radiation transfer model"
how_measured(my.spct)
#> [1] "Simulated with a radiation transfer model"
how_measured(my.spct) <- NULL
how_measured(my.spct)
#> [1] NA