sliceIndex-class {externalVector} | R Documentation |
This represents a sequence that can be created with
seq(start, by=stride, length=n)
where star >= 0
and
start+(n-1)*stride >= 0
.
Objects can be created by calls of the form makeSlice(start,
length, stride)
.
content
:"numeric"
of length
3
. The first element of content
is the start of the
index, the second element is the length of the index, and the
third element is the difference between successive elements of the
index. Names
:"vectorNamesType"
, this
contains names associated with the elements of the index (if any).
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
with x@content[1]
replaced by
x@content[1]+scalar
. scalar+x
:scalar
to x
.
Result is x
with x@content[1]
replaced by
x@content[1]+scalar
. x*scalar
:x
by scalar
.
Result is x
with x@content[3]
replaced by
x@content[3]*scalar
. scalar*x
:x
by scalar
.
Result is x
with x@content[3]
replaced by
x@content[3]*scalar
. x[i]
:i
is 0
, the result
is an object of class "noneIndex"
. Otherwise, the result is
an object of class "sliceIndex"
or of class
"positiveIndex"
. x
. If value is of
length 2, this may create a "matrixIndex". x[]
:allNA(x)
:x
NA
? Result is
always FALSE
. anyNA(x)
:x
NA
? Result is
always FALSE
. length(x)
:x
. 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
.