# Produce a relation file
library(kst)
d <- getwd()
setwd(tempdir())
data(DoignonFalmagne7)
r <- as.relation(kspace(kstructure(as.pattern(DoignonFalmagne7$K, as.set=TRUE))))
write_surmiserelation(r, "DF7.rel", "SRBT") # SRBT format
# Read file
read_surmiserelation("DF7.rel") # Automatic format detection
read_surmiserelation("DF7.rel", "SRBT") # Explicit format specification
setwd(d)
Run the code above in your browser using DataLab