1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
% 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
}
|