View source: R/make-var-labels.R
make_var_labels | R Documentation |
Create a named list of character strings describing the variables contained in a spectrum object.
make_var_labels(x, ...)
## Default S3 method:
make_var_labels(x, ...)
## S3 method for class 'source_spct'
make_var_labels(x, ...)
## S3 method for class 'response_spct'
make_var_labels(x, ...)
## S3 method for class 'filter_spct'
make_var_labels(x, ...)
## S3 method for class 'reflector_spct'
make_var_labels(x, ...)
## S3 method for class 'object_spct'
make_var_labels(x, ...)
## S3 method for class 'solute_spct'
make_var_labels(x, ...)
## S3 method for class 'chroma_spct'
make_var_labels(x, ...)
## S3 method for class 'calibration_spct'
make_var_labels(x, ...)
## S3 method for class 'raw_spct'
make_var_labels(x, ...)
## S3 method for class 'cps_spct'
make_var_labels(x, ...)
x |
An object of a class derived from |
... |
Currently ignored. |
Objects of classes derived from generic_spct
are used to
store different types of spectral data. The data stored in some of the
classes needs to be interpreted differently depending on how they were
measured or are expressed and this information is stored in attributes of
the objects. In other cases, even if consistent across different objects,
the units of expression may not be obvious to users. The names of the
variables are concise, thus using variable labels makes it possible to
make these features visible when exploring the data. The methods provided
do not add the labels, only supply the character strings. Variable labels
are implemented in packages 'labelled' by setting the label
attribute in each variable (= column) of a data frame or tibble. This is
compatible with the approach used by package 'haven'.
A named list of character strings with one member for each recognized
column in x
. This list can be used to set variable labels with
methods from package 'labelled'. However, package 'photobiology' does not
natively support variable labels stored in attribute label
.
make_var_labels(default)
:
make_var_labels(source_spct)
:
make_var_labels(response_spct)
:
make_var_labels(filter_spct)
:
make_var_labels(reflector_spct)
:
make_var_labels(object_spct)
:
make_var_labels(solute_spct)
:
make_var_labels(chroma_spct)
:
make_var_labels(calibration_spct)
:
make_var_labels(raw_spct)
:
make_var_labels(cps_spct)
:
These methods are still under development and the text of the labels
may change. Not all classes derived from generic_spct
are yet
supported.
make_var_labels(sun.spct)
# str() prints more compactly than print()
str(make_var_labels(sun.spct))
str(make_var_labels(normalize(sun.spct)))
str(make_var_labels(fscale(sun.spct)))
str(make_var_labels(sun_daily.spct))
str(make_var_labels(polyester.spct))
str(make_var_labels(normalize(polyester.spct)))
str(make_var_labels(fscale(polyester.spct)))
str(make_var_labels(white_led.cps_spct))
str(make_var_labels(white_led.raw_spct))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.