% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/converters.R
\name{as_matrix}
\alias{as_matrix}
\alias{as_matrix.cooccurrence}
\title{Extract the co-occurrence matrix}
\usage{
as_matrix(x, ...)

\method{as_matrix}{cooccurrence}(x, type = c("normalized", "raw"), ...)
}
\arguments{
\item{x}{A \code{cooccurrence} data frame.}

\item{...}{Ignored.}

\item{type}{Character. \code{"normalized"} (default) or \code{"raw"}.}
}
\value{
A numeric matrix.
}
\description{
Returns the full square co-occurrence matrix (normalized + scaled).
Use \code{type = "raw"} for the raw count matrix.
}
\examples{
res <- cooccurrence(list(c("A","B","C"), c("B","C"), c("A","C")))
as_matrix(res)
as_matrix(res, type = "raw")
}
