NAIndex-class {externalVector} | R Documentation |
When used as a subscript for a vector object x
,
this is equivalent to rep(NA, length(x))
. When used as a subscript for
the i
-th dimension of an array object x
, this is
equivalent to rep(NA, dim(x)[i])
.
Objects can be created by calls of the form new("NAIndex",
Length, Names)
. Length
must be a non-negative
integer. Default value for Length
is 0
.
The Names
argument, if not missing, must be of length
Length
. If missing, Names
is taken to be NULL
.
.Data
:"logical"
, this is
always same as NA
. Length
:"integer"
, this is the
length of the index. Names
:"vectorNamesType"
, this
contains names associated with the elements of the index (if any).
Class "logical"
, directly.
Class "vectorIndex"
, directly.
Signature components for the methods are:
x | The class "allIndex" |
scalar | Length one positive "integer" |
i | The class "ANY" |
value | The class "ANY" |
.Object | The class "allIndex" |
x+scalar
:scalar
to x
.
Result is x
. scalar+x
:scalar
to x
.
Result is x
. x*scalar
:x
by scalar
.
Result is x
. scalar*x
:x
by scalar
.
Result is x
. x
. If value is of
length 2, this may create a "matrixIndex". x[i]
:i
is 0
, the result
is an object of class "noneIndex"
. Otherwise, the result is
an object of class "NAIndex"
with same length as i
. x[]
:x[i] <- value
:"allIndex"
are not mutable. x[[i]] <- value
:"allIndex"
are not mutable. allNA(x)
:x
NA
? Result is
always FALSE
. anyNA(x)
:x
NA
? Result is
always FALSE
. initialize(.Object, Length=0, Names)
:"allIndex"
. length(x)
:x
which is always
Inf
. length(x) <- value
:x
. If
value
is 0
, makes x
an object of class
"noneIndex"
. Otherwise, modifies length of x
to
value
. names(x)
:Names
slot of x
. names(x) <- value
:Names
slot of x
to
value
.
vectorIndex-class
for the super class of "NAIndex"
.