Learn R Programming

rxylib (version 0.2.6)

convert_xy2TKA: Convert xy-data to TKA

Description

Convert data to the Toolkit file format (TKA) as exported by, e.g., by the software Canberra Genie 2000.

Usage

convert_xy2TKA(object, file = NULL, overwrite = FALSE)

Arguments

object

rxylib (required): xy data as imported by the function read_xyData. Optional a file supported by the rxylib-package can be provided as input. Arguments can be provided as list.

file

character (optional): optional file path or file name for the output to be written. If only a path is provided the output file name is derived from the input file name. Argument can be provided as list.

overwrite

logical (with default): force overwriting of existing files if TRUE.

Value

Returns a list of matrix objects or an output TKA-file.

Function version

0.1.0

How to cite

Kreutzer, S., 2020. convert_xy2TKA(): Convert xy-data to TKA. Function version 0.1.0. In: Kreutzer, S., Friedrich, J., 2020. rxylib: Import XY-Data into R . R package version 0.2.6. https://github.com/R-Lum/rxylib

Details

Supported formats

  • Canberra CNF

  • further formats on request ...

Examples

Run this code
# NOT RUN {
##convert CNF data (no export to file system)
convert_xy2TKA(
 object = system.file("extdata/ExampleSpectrum.CNF", package = "rxylib"))

# }
# NOT RUN {
##export as file

##create temporary filepath
##(for usage replace by own path)
temp_file <- tempfile(pattern = "output", fileext = ".TKA")

##convert and write to file system
convert_xy2TKA(
 object = system.file("extdata/ExampleSpectrum.CNF", package = "rxylib"),
 file = temp_file)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab