export_ap2_ToXlsx: Export Data to xlsx

View source: R/prep_importData.r

export_ap2_ToXlsxR Documentation

Export Data to xlsx

Description

Export a dataset to xlsx. The header and the NIR data are being exported into a single worksheet. In an additional worksheet called the name of the experiment with _meta as suffix, the number of columns in the header is denoted, as well as if the first column is the rownames. In the third column called ncpwl the number of characters before the actual wavelength is denoted.

Usage

export_ap2_ToXlsx(dataset, md = getmd(), onlyNIR = FALSE, rowns = TRUE)

Arguments

dataset

An object of class 'aquap_data'

md

List. The object with the metadat of the experiment. The default is to get the metadata file via getmd.

onlyNIR

Logical. If only the NIR data should be exported to xlsx. If left at the default FALSE, the header as well as the NIR data will be exported into a single worksheet.

rowns

Logical. If rownames should be exported as well. Defaults to TRUE.

Details

By providing expName="xxx" in the getmd function at parameter md it is possible to save the generated xlsx file under a different name. See examples.

Value

Invisible TRUE for a successful, invisible FALSE for an unsuccessful generation of the xlsx file. Used for its side effect, i.e. to export a dataset to xlsx.

See Also

Other Helper Functions: ap2_settings_setup(), ap2dme(), export_header_toXls(), genFolderStr(), genNoiseRecExp(), genTempCalibExp(), getcd(), getcm(), getstn(), printStdColnames(), reColor(), saveAQdata(), siWlg(), updateSettings()

Examples

## Not run: 
fd <- gfd()
export_ap2_ToXlsx(fd)
export_ap2_ToXlsx(fd, md=getmd(expName="otherName"))

## End(Not run)

bpollner/aquap2 documentation built on March 29, 2024, 7:33 a.m.