write_surmiserelation: Write a (surmise) relation file

write_surmiserelationR Documentation

Write a (surmise) relation file

Description

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

Usage

  write_surmiserelation(x, filename, format = NULL, sep=',')

Arguments

x

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

filename

A character string specifying the name of the relation file.

format

Specification of the files format. Can be "SRBT", "matrix", CSV", "ODS", or "XLSX". If format is NULL, the format is taken from the filname extension (if ".csv", ".ods", or ".xlsx"), otherwise it is "SRBT".

sep

Cell separator for CSV files.

Details

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

Author(s)

Cord Hockemeyer cord.hockemeyer@uni-graz.at

References

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

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

See Also

kstIO-package

Examples

d <- getwd()
setwd(tempdir())
r <- kmsurmiserelation(phsg$basis)
# Write surmise relation to file
write_surmiserelation(r, "phsg.bas") # Write in (default) SRBT format
write_surmiserelation(r, "phsg.ods") # ODS format
setwd(d)

kstIO documentation built on March 8, 2026, 5:06 p.m.