View source: R/spct.summaries.r
summary.generic_spct | R Documentation |
Methods of generic function summary for objects of spectral classes and of classes for collections of spectra.
## S3 method for class 'generic_spct'
summary(
object,
maxsum = 7,
digits = max(3, getOption("digits") - 3),
...,
expand = "none"
)
## S3 method for class 'generic_mspct'
summary(
object,
maxsum = 7,
digits = max(3, getOption("digits") - 3),
idx = "spct.idx",
which.metadata = NULL,
expand = "none",
...
)
object |
An object of one of the spectral classes for which a summary is desired. |
maxsum |
integer Indicates how many levels should be shown for factors. |
digits |
integer Used for number formatting with |
... |
additional arguments affecting the summary produced, ignored in current version. |
expand |
character One of |
idx |
character Name of the column with the names of the members of the collection of spectra. |
which.metadata |
character vector Names of attributes to retrieve, or
"none" or "all". Obeyed if |
Objects are summarized as is, ignoring the current settings of R options
photobiology.radiation.unit
and photobiology.filter.qty
. Unlike
R's summary, these methods can optionally summarize each spectrum stored in
long form returning a list of summaries. Although this is frequently the most
informative approach, the default remains similar to summary()
method
from R: to summarize object
as a whole. Alternatively, multiple
spectra stored in long form, can optionally be summarized also as a
collection of spectra. Passing "auto"
in the call, is equivalent to
passing "each"
or "collection"
depending on the number of
spectra contained in the object.
A summary object matching the class of object
, or a list of
such objects or a summary object for a matching collection of spectra.
Metadata stored in attributes are copied to identical attributes in the
returned summary objects except when object
is a collection
of spectra or if expand = "collection"
is passed in the call. In
this two cases, a condensed summary is returned as a data frame and
attributes from each member can be copied to variables in it.
summary(generic_mspct)
:
print.summary_generic_spct
summary(sun.spct)
class(summary(sun.spct))
summary(two_filters.spct)
class(summary(two_filters.spct))
summary(sun_evening.spct)
summary(two_filters.spct, expand = "none")
summary(two_filters.spct, expand = "each")
summary(two_filters.spct, expand = "collection")
summary(two_filters.spct, expand = "auto") # <= 4 spectra
summary(sun_evening.spct, expand = "auto") # > 4 spectra
where_measured(sun.spct)
where_measured(summary(sun.spct))
what_measured(summary(two_filters.spct))
what_measured(summary(two_filters.spct, expand = "each")[[1]])
summary(sun_evening.mspct)
summary(sun_evening.mspct, which.metadata = "when.measured")
summary(two_filters.mspct, which.metadata = "what.measured")
summary(two_filters.mspct, expand = "each")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.