# Obtain data to write from the 'pks' package
library(kst)
library(pks)
d <- getwd()
setwd(tempdir())
data(DoignonFalmagne7)
r <- as.relation(kspace(kstructure(as.pattern(DoignonFalmagne7$K, as.set=TRUE))))
# Write surmise relation to file
write_surmiserelation(r, "DF7.bas") # Write in (default) SRBT format
write_surmiserelation(r, "DF7.bas", "matrix") # matrix format
setwd(d)
Run the code above in your browser using DataLab