Learn R Programming

photobiology (version 0.11.3)

print.generic_spct: Print spectral objects

Description

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

Usage

# S3 method for generic_spct
print(x, ..., n = NULL, width = NULL)

# S3 method for generic_mspct print(x, ..., n = NULL, width = NULL, n.members = 10)

Value

Returns x invisibly.

Arguments

x

An object of one of the summary classes for spectra.

...

not used in current version.

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.

Functions

  • print(generic_mspct):

Details

This is simply a wrapper on the print method for tibbles, with additional information in the header. Currently, width applies only to the table of data.

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

Examples

Run this code

print(sun.spct)
print(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)

Run the code above in your browser using DataLab