print.generic_spct: Print spectral objects

View source: R/spct.summaries.r

print.generic_spctR Documentation

Print spectral objects

Description

Print methods for objects of spectral classes, including collections of spectra.

Usage

## S3 method for class 'generic_spct'
print(x, ..., attr.simplify = TRUE, n = NULL, width = NULL)

## S3 method for class 'generic_mspct'
print(x, ..., attr.simplify = TRUE, n = NULL, width = NULL, n.members = 10)

Arguments

x

An object of one of the summary classes for spectra.

...

not used in current version.

attr.simplify

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

n

Number of rows to show. If NULL, the default, will print all rows if less than option dplyr.print_max. Otherwise, will print dplyr.print_min rows.

width

Width of text output to generate. This defaults to NULL, which means use getOption("width") and only display the columns that fit on one screen. You can also set option(dplyr.width = Inf) to override this default and always print all columns.

n.members

numeric Number of members of the collection to print.

Details

This is a wrapper on the print method for tibbles, with additional information in the header. Currently, width applies only to the table of data. To print only the header and a subset of data rows starting from the shortest wavelengths pass a positive integer to n.

Objects are printed as is, ignoring the current settings of R options photobiology.radiation.unit and photobiology.filter.qty.

Value

Returns x invisibly.

Functions

  • print(generic_mspct):

Note

Methods head(), tail() and head_tail() give additional flexibility on the selection of rows to print, while preserving the metadata. The information shown for wavelengths is in contrast to when using print that for the displayed rows

See Also

formatting.

Examples


print(sun.spct)
print(sun.spct, n = 5)

print(head(sun.spct, n = 5))
print(tail(sun.spct, n = 5))
print(head_tail(sun.spct, n = 5))

print(q2e(sun.spct, action = "replace"))
print(e2q(sun.spct, action = "replace"))

print(polyester.spct)
print(any2A(polyester.spct))
print(any2Afr(polyester.spct))

print(two_filters.spct)


photobiology documentation built on Jan. 10, 2026, 9:10 a.m.