% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/plotAbundances.R
\docType{methods}
\name{plotAbundances}
\alias{plotAbundances}
\alias{plotAbundances,daFrame-method}
\title{Population frequencies across samples & clusters}
\usage{
plotAbundances(x, ...)

\S4method{plotAbundances}{daFrame}(x, k = 20, by = c("sample_id",
  "cluster_id"), facet = "condition")
}
\arguments{
\item{x}{a \code{\link{daFrame}}.}

\item{...}{optional arguments.}

\item{k}{specifies which clustering to use.}

\item{by}{a character string specifying whether to plot 
frequencies by samples or clusters.}

\item{facet}{a character string. Should corresponds to a column name of 
\code{rowData(x)}. If specified, the data will be grouped 
according to this variable.}
}
\value{
a \code{ggplot} object.
}
\description{
Plots the relative population abundances of the specified clustering.
}
\examples{
data(PBMC_fs, PBMC_panel, PBMC_md)
re <- daFrame(PBMC_fs, PBMC_panel, PBMC_md)
# run clustering
lineage <- c("CD3", "CD45", "CD4", "CD20", "CD33", 
    "CD123", "CD14", "IgM", "HLA-DR", "CD7")
re <- cluster(re, cols_to_use=lineage)
# plot relative population abundances 
plotAbundances(re, k=12)                 # ...across samples 
plotAbundances(re, k=8, by="cluster_id") # ...across clusters

}
\references{
Nowicka M, Krieg C, Weber LM et al. 
CyTOF workflow: Differential discovery in 
high-throughput high-dimensional cytometry datasets.
\emph{F1000Research} 2017, 6:748 (doi: 10.12688/f1000research.11622.1)
}
\author{
Helena Lucia Crowell \email{crowellh@student.ethz.ch}
}
