% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility_functions.R
\name{setclass}
\alias{setclass}
\title{Set the class of an object (convenience function for
 \code{setattr(obj, "class", CLASS)}); can add instead of replace}
\usage{
setclass(obj, cl, add = FALSE, add.place = "first")
}
\arguments{
\item{obj}{and object for which to set class}

\item{cl}{class to set}

\item{add}{if \code{TRUE}, adds \code{cl} to the 
classes of the \code{obj}; otherwise replaces the class information}

\item{add.place}{\code{"first"} or \code{"last"}; adds \code{cl}
to the front or to the back of the \code{obj}'s class vector}
}
\description{
Sets the class of an object in place to \code{cl}
by replacing or adding
}
\author{
Joonas Miettinen
}
