read_kspace: Read a knowledge space from file

View source: R/read_kspace.R

read_kspaceR Documentation

Read a knowledge space from file

Description

Read a knowledge space from file

Usage

read_kspace(
  filename,
  format = "auto",
  as.letters = TRUE,
  header = TRUE,
  sep = ",",
  enforce = TRUE
)

Arguments

filename

Name of the file

format

File format (default "auto")

as.letters

How to name items (default TRUE)

header

For spreadsheet files: does it include a header line (default TRUE)

sep

Cell separator for CSV files (default ',')

enforce

Do we enforce knowledge space properties (default TRUE)?

Value

List with two elements matrix and sets containing the respective representations of the knowledge space read

Please note that enforcing knowledge space properties (i.e. computing the closure under union) is computationally complex and therefore may take quite some time.

See Also

Other Functions for reading and writing families of sets: read_kbase(), read_kdata(), read_kfamset(), read_kstructure(), write_kbase(), write_kdata(), write_kfamset(), write_kspace(), write_kstructure()

Examples

kstMatrix::xpl$space
tempfile <- paste0(tempdir(), "/test.spc")
write_kspace(kstMatrix::xpl$space, tempfile, format="SRBT")
read_kspace(tempfile)



kstIO documentation built on Sept. 7, 2026, 9:06 a.m.