View source: R/write_RLum2CSV.R
write_RLum2CSV | R Documentation |
This function exports RLum-objects to CSV-files using the R function utils::write.table. All RLum-objects are supported, but the export is lossy, i.e. the pure numerical values are exported only. Information that cannot be coerced to a data.frame or a matrix are discarded as well as metadata.
write_RLum2CSV(
object,
path = NULL,
prefix = "",
export = TRUE,
compact = TRUE,
...
)
object |
RLum or a list of |
path |
character (optional):
character string naming folder for the output to be written. If nothing
is provided |
prefix |
character (with default): optional prefix to name the files. This prefix is valid for all written files |
export |
logical (with default):
enable or disable the file export. If set to |
compact |
logical (with default): if |
... |
further arguments that will be passed to the function
utils::write.table. All arguments except the argument |
However, in combination with the implemented import functions, nearly every supported import data format can be exported to CSV-files, this gives a great deal of freedom in terms of compatibility with other tools.
Input is a list of objects
If the input is a list of objects all explicit function arguments can be provided as list.
The function returns either a CSV-file (or many of them) or for the
option export == FALSE
a list comprising objects of type data.frame and matrix
0.2.2
Kreutzer, S., 2024. write_RLum2CSV(): Export RLum-objects to CSV. Function version 0.2.2. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Philippe, A., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., Galharret, J., 2024. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 0.9.24. https://CRAN.R-project.org/package=Luminescence
Sebastian Kreutzer, Geography & Earth Science, Aberystwyth University (United Kingdom) , RLum Developer Team
RLum.Analysis, RLum.Data, RLum.Results, utils::write.table
##transform values to a list (and do not write)
data(ExampleData.BINfileData, envir = environment())
object <- Risoe.BINfileData2RLum.Analysis(CWOSL.SAR.Data)[[1]]
write_RLum2CSV(object, export = FALSE)
## Not run:
##create temporary filepath
##(for usage replace by own path)
temp_file <- tempfile(pattern = "output", fileext = ".csv")
##write CSV-file to working directory
write_RLum2CSV(temp_file)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.