write_kspace: Write a knowledge space file

write_kspaceR Documentation

Write a knowledge space file

Description

Write a knowledge space to a file. The file formats are described in the kstIO-package information page.

Usage

  write_kspace(x, filename, format = "SRBT")

Arguments

x

The data to be written, either a binary matrix or an object of kspace class.

filename

A character string specifying the name of the base file.

format

Specification of the files format. Can be "SRBT" (default), "KST", "CSV", or "matrix".

Details

The format values "SRBT", "KST", and "matrix" refer to the different generations of file formats described in kstIO-package.

Author(s)

Cord Hockemeyer cord.hockemeyer@uni-graz.at

References

Hockemeyer, C. (2001). KST Tools User Manual (2nd ed.). https://kst.hockemeyer.at/techreports/KST-Tools_TechRep_FWF01.pdf.

Poetzi, S. & Wesiak, G. (2001). SRbT Tools User Manual. https://kst.hockemeyer.at/techreports/SRBT-Tools_TechRep_FWF01.pdf

See Also

space_property, kstIO-package

Examples

# Obtain data to write from the 'pks' package
library(kst)
d <- getwd()
setwd(tempdir())
data(DoignonFalmagne7)
ksp <- kspace(kstructure(as.pattern(DoignonFalmagne7$K, as.set=TRUE)))
# Write space to file
write_kspace(ksp, "DF7.spc") # Write in (default) SRBT format
write_kspace(DoignonFalmagne7$K, "DF7.spc", "KST") # Write the matrix directly in (old) KST format
setwd(d)

kstIO documentation built on Feb. 16, 2023, 6:22 p.m.