Learn R Programming

rxylib (version 0.2.14)

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)

Value

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

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.

Function version

0.1.1

Author

Sebastian Kreutzer, Institute of Geography, Universität Heidelberg, Germany

How to cite

Kreutzer, S., 2024. convert_xy2TKA(): Convert xy-data to TKA. Function version 0.1.1. In: Kreutzer, S., Friedrich, J., 2024. rxylib: Import XY-Data into R . R package version 0.2.14.9000-2. https://r-lum.github.io/rxylib/

Details

Supported formats

  • Canberra CNF

  • further formats on request ...

Examples

Run this code

##convert CNF data (no export to file system)
convert_xy2TKA(
 object = system.file("extdata/ExampleSpectrum.CNF", package = "rxylib"))

if (FALSE) {
##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)

}

Run the code above in your browser using DataLab