allIndex-class {externalVector}R Documentation

Class "allIndex", index class representing a subscript for all elements of a vector or an array dimension

Description

When used as a subscript for a vector object x, this is equivalent to seq(length(x)). When used as a subscript for the i-th dimension of an array object x, this is equivalent to seq(dim(x)[i]).

Objects from the Class

Objects can be created by calls of the form new("allIndex"). Objects from this class can not be modified and they are all equivalent.

Slots

.Data:
Object of class "logical", this is always equal to TRUE.

Extends

Class "logical", directly. Class "vectorIndex", directly.

Methods

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:
Add scalar to x. Result is x.
scalar+x:
Add scalar to x. Result is x.
x*scalar:
Multiply x by scalar. Result is x.
scalar*x:
Multiply x by scalar. Result is x.
dim(x) <- value
Set a dimension on x. If value is of length 2, this may create a "matrixIndex".
x[i]:
Subset x. Result is i.
x[]:
Subset x with the subscript missing. Result is x.
x[i] <- value:
Subassign x. Results in an error (as objects from class "allIndex" are not mutable.
x[[i]] <- value:
Subassign x. Results in an error (as objects from class "allIndex" are not mutable.
allNA(x):
Are all elements of x NA? Result is always FALSE.
anyNA(x):
Is any element of x NA? Result is always FALSE.
initialize(.Object):
Initialize an object from class "allIndex".
length(x):
Return the length of x which is always Inf.
length(x) <- value:
Modify the length of x. Always results in an error.

See Also

vectorIndex-class for the super class of "allIndex".


[Package externalVector version 1.0.14 Index]