robiatomic.Rd 2.45 KB
Newer Older
Eric Coissac's avatar
Eric Coissac committed
1
% Generated by roxygen2: do not edit by hand
Eric Coissac's avatar
Eric Coissac committed
2
% Please edit documentation in R/type_robiatomic.R, R/robicategory.R
3
\name{robiatomic}
Eric Coissac's avatar
Eric Coissac committed
4
\alias{robiatomic}
5 6
\alias{new_robiatomic}
\alias{is_robiatomic}
Eric Coissac's avatar
Eric Coissac committed
7
\alias{as_robiatomic}
8
\alias{c.robiatomic}
9
\alias{is_robicategory}
10
\title{Robiatomic vectors.}
Eric Coissac's avatar
Eric Coissac committed
11
\usage{
12
robiatomic(length = 0)
Eric Coissac's avatar
Eric Coissac committed
13

14
new_robiatomic(object, ..., class)
Eric Coissac's avatar
Eric Coissac committed
15

16
is_robiatomic(object)
Eric Coissac's avatar
Eric Coissac committed
17

18
as_robiatomic(object)
Eric Coissac's avatar
Eric Coissac committed
19

20
\method{c}{robiatomic}(...)
21 22

is_robicategory(object)
Eric Coissac's avatar
Eric Coissac committed
23 24
}
\arguments{
25 26 27 28 29
\item{length}{A non-negative integer specifying the desired length. Double
values will be coerced to integer: supplying an argument of length other
than one is an error.}

\item{object}{the object used as base to build the \code{robitatomic} instance}
Eric Coissac's avatar
Eric Coissac committed
30

31 32 33
\item{...}{Passed on to \code{\link[base:structure]{base::structure()}}. It allows for
defining attributes, specified in tag = value form, which will be attached
to data.}
Eric Coissac's avatar
Eric Coissac committed
34

35 36
\item{class}{Subclasses to assign to the new object. For the \code{robiatomic}
constructor, \code{class}must be specied as \code{robiatomic} is an abstract class.}
Eric Coissac's avatar
Eric Coissac committed
37

38
\item{`object`}{the object to test}
Eric Coissac's avatar
Eric Coissac committed
39 40
}
\value{
41 42 43 44
the \code{robiatomic()} constructor returns nothing but raises an error.

\code{new_robiatomic} returns a new instance of \code{robiatomic}.

45 46
a \code{\link{logical}} value

47
a \code{\link{logical}} value
Eric Coissac's avatar
Eric Coissac committed
48 49
}
\description{
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
\code{robiatomic} is an abstract class in the ROBITools2 package. It is the ancestor
of every vector values. It is relying on the \code{\link{vctrs}} library. and most
of the \code{robiatomic} subclasses are also subclasses of
\code{\link[vctrs:vctrs_vctr]{vctrs::vctrs_vctr}}. It is notably the super class of :
}
\details{
\itemize{
\item \code{\link{robicategory}}
\item \code{\link{robitag}}
\item \code{\link{robitaxid}}
\item \code{\link{robiuniqueid}}
}

the \code{robiatomic()} constructor just raises an error.

65 66
\code{is_robiatomic} tests if an object belongs the \code{robiatomic} class

67 68 69 70 71
\code{as_robiatomic} throw an error to prevent creation of an abstract
class instance.

The \code{robiatomic} version of the \code{\link[base:c]{base::c()}} method relies on the
\code{\link[vctrs:vec_c]{vctrs::vec_c()}} function and is actually just calling it.
72 73

\code{is_robicategory} tests if an object belongs the \code{robicategory} class
74 75 76 77 78 79 80 81
}
\examples{

xd <- new_robiatomic(1:10,class="robifoo")

is_robiatomic(xd)
is_robiatomic(1:10)

82 83 84 85

is_robicategory(rc)
is_robiatomic(1:10)

86 87 88
}
\author{
Eric Coissac \href{mailto:eric.coissac@metabarcoding.org}{eric.coissac@metabarcoding.org}
Eric Coissac's avatar
Eric Coissac committed
89
}