Files
ROBITools/man/addS3Class.Rd

42 lines
861 B
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s3objects.R
\name{addS3Class}
\alias{addS3Class}
\title{Adds a class into the class hierarchie attribute.}
\usage{
addS3Class(object, classname)
}
\arguments{
\item{object}{the object to modify}
\item{classname}{the name of the new class}
}
\value{
the object given as parametter casted to the new
class
}
\description{
\code{addS3Class} adds a new class name to the vector
of class associated to the object. This the way to
assign an object to an S3 class. \code{addS3Class} add
the new class name in front of the class vector
}
\note{
for efficiency purpose no check is done on the input
parametters
}
\examples{
x = c(1,3,2,5)
x = addS3Class(x,"my.vector")
class(x)
}
\seealso{
\code{\link{rmS3Class}}
}
\author{
Eric Coissac
}
\keyword{function}
\keyword{system}