print(), show(), and summary() show the result of as.character().
# S4 method for hyperSpec as.character( x, digits = getOption("digits"), range = TRUE, max.print = 5, shorten.to = c(2, 1) ) # S4 method for hyperSpec show(object) # S4 method for hyperSpec print(x, range = FALSE, ...) # S4 method for hyperSpec summary(object, ...)
| x | a |
|---|---|
| digits | number of digits handed over to |
| range | should the values be indicated as range rather then first and last elements? |
| max.print | maximum number of elements to be printed (of a variable) |
| shorten.to | if a vector is longer than |
| object | a |
| ... |
|
as.character returns a character vector fit to be printed by
cat with sep = "\n".
print invisibly returns x after printing, show returns
an invisible NULL.
print(), show(), and summary() differ only in the defaults:
show() displays the range of values instead,
print() shows the overview giving the first and last values of each
data column (fastest),
summary() ...
faux_cell#> hyperSpec object #> 875 spectra #> 4 data columns #> 300 data points / spectrum #> wavelength: Delta * tilde(nu)/cm^-1 [numeric] 602 606 ... 1798 #> data: (875 rows x 4 columns) #> 1. x: x position [numeric] -11.55 -10.55 ... 22.45 #> 2. y: y position [numeric] -4.77 -4.77 ... 19.23 #> 3. region: [factor] matrix matrix ... matrix #> 4. spc: intensity (arbitrary units) [matrix, array300] 15 168 ... 93show(faux_cell)#> hyperSpec object #> 875 spectra #> 4 data columns #> 300 data points / spectrum #> wavelength: Delta * tilde(nu)/cm^-1 [numeric] 602 606 ... 1798 #> data: (875 rows x 4 columns) #> 1. x: x position [numeric] -11.55 -10.55 ... 22.45 #> 2. y: y position [numeric] -4.77 -4.77 ... 19.23 #> 3. region: [factor] matrix matrix ... matrix #> 4. spc: intensity (arbitrary units) [matrix, array300] 15 168 ... 93summary(faux_cell)#> hyperSpec object #> 875 spectra #> 4 data columns #> 300 data points / spectrum #> wavelength: Delta * tilde(nu)/cm^-1 [numeric] 602 606 ... 1798 #> data: (875 rows x 4 columns) #> 1. x: x position [numeric] -11.55 -10.55 ... 22.45 #> 2. y: y position [numeric] -4.77 -4.77 ... 19.23 #> 3. region: [factor] matrix matrix ... matrix #> 4. spc: intensity (arbitrary units) [matrix, array300] 15 168 ... 93#> hyperSpec object #> 875 spectra #> 4 data columns #> 300 data points / spectrum #> wavelength: Delta * tilde(nu)/cm^-1 [numeric] 602 606 ... 1798 #> data: (875 rows x 4 columns) #> 1. x: x position [numeric] -11.55 -10.55 ... 22.45 #> 2. y: y position [numeric] -4.77 -4.77 ... 19.23 #> 3. region: [factor] matrix matrix ... matrix #> 4. spc: intensity (arbitrary units) [matrix, array300] 15 168 ... 93