write_db: Write a spreadsheet with IDs.

View source: R/write_db.R

write_dbR Documentation

Write a spreadsheet with IDs.

Description

A helper utility to handle writing of spreadsheet files.

Usage

write_db(df, file, filetype, ...)

Arguments

df

A data.frame containing the experiment data.

file

The name of the file to be written to.

filetype

The filetype of the input spreadsheet. Microsoft Excel (.xlsx and .xls) and Open Document Format (.ods; as used by OpenOffice/LibreOffice for example) are supported, as are comma- and tab-delimited formats (.csv, .tsv/.txt). The default behaviour is to guess the format from the file extension. If this does not work or you know better than the machine, then this option can be used to specify the filetype.

...

Additional parameters passed to the file reader. The parameters accepted depend on the input filetype.

Details

This function should not need to be called directly by the user.

The code used to write the file depends on the filetype. The filetype is determined by the extension given in the file parameter or can be overridden by the filetype parameter. For more information about file writing parameters, have a look at the documentation for the respective packages: write.xlsx for writing .xlsx files. Note that an input filetype of .xls will cause a .xlsx file to be written (as .xls is not supported). write_ods for writing .ods files. This is the Open Document standard used by software such as OpenOffice and LibreOffice. write.csv for writing .csv files. If filetype = 'csv2', then write.csv2 is used (where commas are used as decimal separators as is common in Europe). write.table for writing .tsv, .tab, .txt files. This is just tab-delimited text. The same file extension used for the input file will be used to write the output.

See Also

make_ids.


rupertoverall/idLabelR documentation built on Aug. 27, 2023, 12:39 p.m.