Learn R Programming

geoSpectral (version 0.17.5)

spc.export.xlsx: Exports a Spectra object into Excel format.

Description

Exports a Spectra object into Excel format.

Usage

spc.export.xlsx(
  input,
  filename,
  sheetName,
  writeheader = TRUE,
  append = F,
  sep = ";",
  ...
)

# S4 method for Spectra spc.export.xlsx( input, filename, sheetName, writeheader = TRUE, append = F, sep = ";", ... )

Arguments

input

A Spectra object

filename

Name of the output xlsx file

sheetName

The Spectra object to be output.

writeheader

A boolean, indicating whether or not the metadata (contents of the slot header) is to be included in the excel file. Default : TRUE

append

A boolean, indicating whether or not to append the contents of the Spectra object into the existing file. Default : FALSE (overwrites the existing Excel file if it exists.)

sep

Not used.

...

Not used.

Value

None. Simply creates an Excel file on disk.

Details

spc.export.xlsx() calls functions from package xlsx to write the contents of a Spectra object into an Excel file. For this function to work, make sure the package xlsx is installed.

Examples

Run this code
# NOT RUN {
  sp=spc.example_spectra()
  if("xlsx" %in% installed.packages())
     spc.export.xlsx(sp,"test.xlsx")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab