read_surmiserelation: Read surmise relation file

read_surmiserelationR Documentation

Read surmise relation file

Description

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

Usage

  read_surmiserelation(filename, 
                       format = "auto", 
                       header = TRUE,
                       as.letters = TRUE,
                       sep = ',')

Arguments

filename

A character string specifying the name of the base file.

format

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

header

Whether spreadsheet file contains header row.

as.letters

logical, should the elements of the sets be letters or numbers? Defaults to TRUE.

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 value "auto" (default) requests an automatic detection of the format by the read_XXX function.

If as.letters is TRUE (default), the elements of the sets are letters, otherwise numbers.

The relation is always closed under reflexivity and transitivity.

Value

The incidence matrix of the surmise relation.

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

# Produce a relation file
d <- getwd()
setwd(tempdir())
r <- kmsurmiserelation(phsg$basis)
write_surmiserelation(r, "phsg.rel", "SRBT") # SRBT format
# Read file
read_surmiserelation("phsg.rel") # Automatic format detection
read_surmiserelation("phsg.rel", "SRBT") # Explicit format specification
setwd(d)

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