sliceIndex-class {externalVector} | R Documentation |

## Class "sliceIndex", index class representing a sequence of
non-negative integers

### Description

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 from the Class

Objects can be created by calls of the form ```
makeSlice(start,
length, stride)
```

.

### Slots

`content`

:- Object of class
`"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`

:- Object of class
`"vectorNamesType"`

, this
contains names associated with the elements of the index (if any).

### Extends

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`

with `x@content[1]`

replaced by
`x@content[1]+scalar`

.
`scalar+x`

:- Add
`scalar`

to `x`

.
Result is `x`

with `x@content[1]`

replaced by
`x@content[1]+scalar`

.
`x*scalar`

:- Multiply
`x`

by `scalar`

.
Result is `x`

with `x@content[3]`

replaced by
`x@content[3]*scalar`

.
`scalar*x`

:- Multiply
`x`

by `scalar`

.
Result is `x`

with `x@content[3]`

replaced by
`x@content[3]*scalar`

.
`x[i]`

:- Subset x. If length of
`i`

is `0`

, the result
is an object of class `"noneIndex"`

. Otherwise, the result is
an object of class `"sliceIndex"`

or of class
`"positiveIndex"`

.
- dim(x) <- value
- Set a dimension on
`x`

. If value is of
length 2, this may create a "matrixIndex".
`x[]`

:- Subset x with the subscript missing. Result is x.
`allNA(x)`

:- Are all elements of
`x`

`NA`

? Result is
always `FALSE`

.
`anyNA(x)`

:- Is any element of
`x`

`NA`

? Result is
always `FALSE`

.
`length(x)`

:- Return the length of
`x`

.
`length(x) <- value`

:- Modify the length of
`x`

. If
`value`

is `0`

, makes `x`

an object of class
`"noneIndex"`

. Otherwise, modifies length of `x`

to
`value`

.
`names(x)`

:- Returns the
`Names`

slot of `x`

.
`names(x) <- value `

:- Sets the
`Names`

slot of `x`

to
`value`

.

[Package

*externalVector* version 1.0.14

Index]