Print methods for objects of spectral classes, including collections of spectra.
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 printdplyr.print_minrows.- 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.
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.
Examples
print(sun.spct)
#> Object: source_spct [522 x 3]
#> Wavelength range 280-800 nm, step 0.9230769-1 nm
#> Label: sunlight, simulated
#> Measured on 2010-06-22 09:51:00 UTC
#> Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
#> Variables:
#> w.length: Wavelength [nm]
#> s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
#> s.q.irrad: Spectral photon irradiance [mol s-1 m-2 nm-1]
#> --
#> # A tibble: 522 × 3
#> w.length s.e.irrad s.q.irrad
#> <dbl> <dbl> <dbl>
#> 1 280 0 0
#> 2 281. 0 0
#> 3 282. 0 0
#> 4 283. 0 0
#> 5 284. 0 0
#> 6 285. 0 0
#> 7 286. 0 0
#> 8 286. 0 0
#> 9 287. 0 0
#> 10 288. 0 0
#> # ℹ 512 more rows
print(sun.spct, n = 5)
#> Object: source_spct [522 x 3]
#> Wavelength range 280-800 nm, step 0.9230769-1 nm
#> Label: sunlight, simulated
#> Measured on 2010-06-22 09:51:00 UTC
#> Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
#> Variables:
#> w.length: Wavelength [nm]
#> s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
#> s.q.irrad: Spectral photon irradiance [mol s-1 m-2 nm-1]
#> --
#> # A tibble: 522 × 3
#> w.length s.e.irrad s.q.irrad
#> <dbl> <dbl> <dbl>
#> 1 280 0 0
#> 2 281. 0 0
#> 3 282. 0 0
#> 4 283. 0 0
#> 5 284. 0 0
#> # ℹ 517 more rows
print(head(sun.spct, n = 5))
#> Object: source_spct [5 x 3]
#> Wavelength range 280-283.69231 nm, step 0.9230769 nm
#> Label: sunlight, simulated
#> Measured on 2010-06-22 09:51:00 UTC
#> Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
#> Variables:
#> w.length: Wavelength [nm]
#> s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
#> s.q.irrad: Spectral photon irradiance [mol s-1 m-2 nm-1]
#> --
#> # A tibble: 5 × 3
#> w.length s.e.irrad s.q.irrad
#> <dbl> <dbl> <dbl>
#> 1 280 0 0
#> 2 281. 0 0
#> 3 282. 0 0
#> 4 283. 0 0
#> 5 284. 0 0
print(tail(sun.spct, n = 5))
#> Object: source_spct [5 x 3]
#> Wavelength range 796-800 nm, step 1 nm
#> Label: sunlight, simulated
#> Measured on 2010-06-22 09:51:00 UTC
#> Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
#> Variables:
#> w.length: Wavelength [nm]
#> s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
#> s.q.irrad: Spectral photon irradiance [mol s-1 m-2 nm-1]
#> --
#> # A tibble: 5 × 3
#> w.length s.e.irrad s.q.irrad
#> <dbl> <dbl> <dbl>
#> 1 796 0.408 0.00000272
#> 2 797 0.414 0.00000276
#> 3 798 0.424 0.00000283
#> 4 799 0.419 0.00000280
#> 5 800 0.407 0.00000272
print(head_tail(sun.spct, n = 5))
#> Object: source_spct [10 x 3]
#> Wavelength range 280-800 nm, step 0.9230769-512.3077 nm
#> Label: sunlight, simulated
#> Measured on 2010-06-22 09:51:00 UTC
#> Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
#> Variables:
#> w.length: Wavelength [nm]
#> s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
#> s.q.irrad: Spectral photon irradiance [mol s-1 m-2 nm-1]
#> --
#> # A tibble: 10 × 3
#> w.length s.e.irrad s.q.irrad
#> <dbl> <dbl> <dbl>
#> 1 280 0 0
#> 2 281. 0 0
#> 3 282. 0 0
#> 4 283. 0 0
#> 5 284. 0 0
#> 6 796 0.408 0.00000272
#> 7 797 0.414 0.00000276
#> 8 798 0.424 0.00000283
#> 9 799 0.419 0.00000280
#> 10 800 0.407 0.00000272
print(q2e(sun.spct, action = "replace"))
#> Object: source_spct [522 x 2]
#> Wavelength range 280-800 nm, step 0.9230769-1 nm
#> Label: sunlight, simulated
#> Measured on 2010-06-22 09:51:00 UTC
#> Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
#> Variables:
#> w.length: Wavelength [nm]
#> s.e.irrad: Spectral energy irradiance [W m-2 nm-1]
#> --
#> # A tibble: 522 × 2
#> w.length s.e.irrad
#> <dbl> <dbl>
#> 1 280 0
#> 2 281. 0
#> 3 282. 0
#> 4 283. 0
#> 5 284. 0
#> 6 285. 0
#> 7 286. 0
#> 8 286. 0
#> 9 287. 0
#> 10 288. 0
#> # ℹ 512 more rows
print(e2q(sun.spct, action = "replace"))
#> Object: source_spct [522 x 2]
#> Wavelength range 280-800 nm, step 0.9230769-1 nm
#> Label: sunlight, simulated
#> Measured on 2010-06-22 09:51:00 UTC
#> Measured at 60.20911 N, 24.96474 E; Kumpula, Helsinki, FI
#> Variables:
#> w.length: Wavelength [nm]
#> s.q.irrad: Spectral photon irradiance [mol s-1 m-2 nm-1]
#> --
#> # A tibble: 522 × 2
#> w.length s.q.irrad
#> <dbl> <dbl>
#> 1 280 0
#> 2 281. 0
#> 3 282. 0
#> 4 283. 0
#> 5 284. 0
#> 6 285. 0
#> 7 286. 0
#> 8 286. 0
#> 9 287. 0
#> 10 288. 0
#> # ℹ 512 more rows
print(polyester.spct)
#> Object: filter_spct [561 x 2]
#> Wavelength range 240-800 nm, step 1 nm
#> Label: Polyester, clear film, 0.000125 m thick, Autostat CT5 from McDermit Autotype; new
#> Rfr (/1): 0.074, thickness (mm): 0.125, attenuation mode: absorption.
#> Variables:
#> w.length: Wavelength [nm]
#> Tfr: Total spectral transmittance [/1]
#> --
#> # A tibble: 561 × 2
#> w.length Tfr
#> <int> <dbl>
#> 1 240 0.00482
#> 2 241 0.00464
#> 3 242 0.00446
#> 4 243 0.00429
#> 5 244 0.00414
#> 6 245 0.004
#> 7 246 0.004
#> 8 247 0.004
#> 9 248 0.004
#> 10 249 0.004
#> # ℹ 551 more rows
print(any2A(polyester.spct))
#> Object: filter_spct [561 x 3]
#> Wavelength range 240-800 nm, step 1 nm
#> Label: Polyester, clear film, 0.000125 m thick, Autostat CT5 from McDermit Autotype; new
#> Rfr (/1): 0.074, thickness (mm): 0.125, attenuation mode: absorption.
#> Variables:
#> w.length: Wavelength [nm]
#> Tfr: Total spectral transmittance [/1]
#> A: Spectral absorbance log10 based [a.u.]
#> --
#> # A tibble: 561 × 3
#> w.length Tfr A
#> <int> <dbl> <dbl>
#> 1 240 0.00482 2.32
#> 2 241 0.00464 2.33
#> 3 242 0.00446 2.35
#> 4 243 0.00429 2.37
#> 5 244 0.00414 2.38
#> 6 245 0.004 2.40
#> 7 246 0.004 2.40
#> 8 247 0.004 2.40
#> 9 248 0.004 2.40
#> 10 249 0.004 2.40
#> # ℹ 551 more rows
print(any2Afr(polyester.spct))
#> Object: filter_spct [561 x 3]
#> Wavelength range 240-800 nm, step 1 nm
#> Label: Polyester, clear film, 0.000125 m thick, Autostat CT5 from McDermit Autotype; new
#> Rfr (/1): 0.074, thickness (mm): 0.125, attenuation mode: absorption.
#> Variables:
#> w.length: Wavelength [nm]
#> Tfr: Total spectral transmittance [/1]
#> Afr: Spectral absorptance [/1]
#> --
#> # A tibble: 561 × 3
#> w.length Tfr Afr
#> <int> <dbl> <dbl>
#> 1 240 0.00482 0.921
#> 2 241 0.00464 0.921
#> 3 242 0.00446 0.922
#> 4 243 0.00429 0.922
#> 5 244 0.00414 0.922
#> 6 245 0.004 0.922
#> 7 246 0.004 0.922
#> 8 247 0.004 0.922
#> 9 248 0.004 0.922
#> 10 249 0.004 0.922
#> # ℹ 551 more rows
print(two_filters.spct)
#> Object: filter_spct [1,172 x 3]
#> containing 2 spectra in long form
#> Wavelength range 240-800 nm, step -610-1 nm
#> Label: Polyester, clear film, 0.000125 m thick, Autostat CT5 from McDermit Autotype; new
#> Rfr (/1): NA, thickness (mm): NA, attenuation mode: NA.
#> Variables:
#> w.length: Wavelength [nm]
#> Tfr: Total spectral transmittance [/1]
#> --
#> # A tibble: 1,172 × 3
#> w.length Tfr spct.idx
#> <int> <dbl> <fct>
#> 1 240 0.00482 spct_1
#> 2 241 0.00464 spct_1
#> 3 242 0.00446 spct_1
#> 4 243 0.00429 spct_1
#> 5 244 0.00414 spct_1
#> 6 245 0.004 spct_1
#> 7 246 0.004 spct_1
#> 8 247 0.004 spct_1
#> 9 248 0.004 spct_1
#> 10 249 0.004 spct_1
#> # ℹ 1,162 more rows
