% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kmprettyprint.R
\encoding{UTF-8}
\name{kmprettyprint}
\alias{kmprettyprint}
\alias{kmprettyprint.numeric}
\alias{kmprettyprint.kmfamset}
\alias{kmprettyprint.kmattributionfunction}
\alias{kmprettyprint.kmattributionrelation}
\alias{kmprettyprint.kmdata}
\alias{kmprettyprint.kmlearningpathlist}
\alias{kmprettyprint.kmlearningpathmatrices}
\alias{kmprettyprint.kmlearningpathmatrix}
\title{Print KST objects in set notation}
\usage{
kmprettyprint(
  x,
  simplified = FALSE,
  ...,
  open = "{",
  close = "}",
  inneropen = "{",
  innerclose = "}"
)

\method{kmprettyprint}{numeric}(
  x,
  simplified = FALSE,
  ...,
  open = "{",
  close = "}",
  itemsep = ", "
)

\method{kmprettyprint}{kmfamset}(
  x,
  simplified = FALSE,
  ...,
  open = "{",
  close = "}",
  inneropen = "{",
  innerclose = "}"
)

\method{kmprettyprint}{kmattributionfunction}(
  x,
  simplified = FALSE,
  ...,
  open = "[",
  close = "]",
  inneropen = "{",
  innerclose = "}",
  mapsto = NULL
)

\method{kmprettyprint}{kmattributionrelation}(
  x,
  simplified = FALSE,
  ...,
  open = "{",
  close = "}",
  inneropen = "(",
  innerclose = ")",
  tuple = TRUE,
  relation = NULL
)

\method{kmprettyprint}{kmdata}(
  x,
  simplified = FALSE,
  ...,
  open = "(",
  close = ")",
  inneropen = "{",
  innerclose = "}"
)

\method{kmprettyprint}{kmlearningpathlist}(
  x,
  simplified = FALSE,
  ...,
  open = "",
  close = "",
  inneropen = "{",
  innerclose = "}",
  path = NULL
)

\method{kmprettyprint}{kmlearningpathmatrices}(
  x,
  simplified = FALSE,
  ...,
  open = "",
  close = "",
  inneropen = "{",
  innerclose = "}",
  path = NULL
)

\method{kmprettyprint}{kmlearningpathmatrix}(
  x,
  simplified = FALSE,
  ...,
  open = "",
  close = "",
  inneropen = "{",
  innerclose = "}",
  path = NULL
)
}
\arguments{
\item{x}{Object to be printed}

\item{simplified}{Omit inner braces for families of sets (default FALSE)}

\item{...}{Optional further arguments}

\item{open}{(Outer) opening bracket}

\item{close}{(Outer) closing bracket}

\item{inneropen}{Inner opening bracket}

\item{innerclose}{Inner closing bracket}

\item{itemsep}{Item separating character string}

\item{mapsto}{Mapsto symbol for pretty-printing surmise
and attribution functions
(Default: '\ifelse{html}{\out{&mapsto;}}{\out{$\mapsto$}}')}

\item{tuple}{Should we use tuple notation (default TRUE)?}

\item{relation}{Relation symbol for pretty-printing surmise
and attribution relations}

\item{path}{Rightarrow for pretty-printing path
(Default: '\ifelse{html}{\out{&rarr;}}{\out{$\rightarrow$}}')}
}
\description{
\code{kmprettyprint()} formats KST objects in set notation for printing.
For further details, see below.
}
\details{
If \code{simplified} is TRUE, a state '\{a, b, c\}' is printed as 'abc'.
This should only be used if the item names are single letters.

For Families of sets (\code{kmfamset} and sub classes), the states are
ordered by cardinality.

\code{inneropen} and \code{innerclose} are ignored for numeric vectors
(i.e. states/plain sets).

\code{mapsto} defines the 'mapsto' symbol for pretty-printing a surmise or
attribution function. It may contain more than one character, as in the
default.

For surmise and attribution relations, there are two special parameters.
\code{tuple} sets whether the relation shall be printed as set of ordered
pairs or whether it shall be printed as tuple of pairs with relation
symbol which can  be set with the \code{relation} parameter.

For \code{kmlearningpaths} lists, thre result should be printed through
\code{cat()} instead of \code{print()} because the latter does not execute
the line breaks.

Please note that the methods can also be used for sub classes, e.g. the
\code{kmprettyprinting.kmfamset()} method is also applicable for bases,
knowledge structures, and knowledge spaces.

\code{kmprettyprint()} was decidedly not implemented as \code{print()}
method. This way, one can \emph{print} KST objects in matrix or data frame
notation or \emph{prettyprint} them in set notation etc.
}
\examples{
kmprettyprint(xpl$basis)
kmprettyprint(xpl$basis, simplified=TRUE)
kmprettyprint(xpl$sr)
kmprettyprint(xpl$sf)

}
\seealso{
Other Functions for plotting and printing knowledge structures:
\code{\link[=kmcolors]{kmcolors()}},
\code{\link{plot}}
}
\concept{Functions for plotting and printing knowledge structures}
