\name{sliceIndex-class} \docType{class} \alias{sliceIndex-class} \alias{Arith,sliceIndex,numeric-method} \alias{Arith,numeric,sliceIndex-method} \alias{[,sliceIndex,allIndex,missing,ANY-method} \alias{[,sliceIndex,noneIndex,missing,ANY-method} \alias{[,sliceIndex,sliceIndex,missing,ANY-method} \alias{[,sliceIndex,positiveIndex,missing,ANY-method} \alias{[,sliceIndex,ANY,missing,ANY-method} \alias{allNA,sliceIndex-method} \alias{anyNA,sliceIndex-method} \alias{coerce,sliceIndex,positiveIndex-method} \alias{length,sliceIndex-method} \alias{length<-,sliceIndex-method} \alias{names,sliceIndex-method} \alias{names<-,sliceIndex,ANY-method} \alias{names<-,sliceIndex,externalVector-method} \alias{dim<-,sliceIndex,ANY-method} \title{Class "sliceIndex", index class representing a sequence of non-negative integers } \description{ This represents a sequence that can be created with \code{seq(start, by=stride, length=n)} where \code{star >= 0} and \code{start+(n-1)*stride >= 0}. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{makeSlice(start, length, stride)}. } \section{Slots}{ \describe{ \item{\code{content}:}{Object of class \code{"numeric"} of length \code{3}. The first element of \code{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. } \item{\code{Names}:}{Object of class \code{"vectorNamesType"}, this contains names associated with the elements of the index (if any). } } } \section{Extends}{ Class \code{"vectorIndex"}, directly. } \section{Methods}{ Signature components for the methods are: \tabular{ll}{ x \tab The class "allIndex"\cr scalar \tab Length one positive "integer"\cr i \tab The class "ANY"\cr value \tab The class "ANY"\cr .Object \tab The class "allIndex"\cr } \describe{ \item{\code{x+scalar}:}{ Add \code{scalar} to \code{x}. Result is \code{x} with \code{x@content[1]} replaced by \code{x@content[1]+scalar}. } \item{\code{scalar+x}:}{ Add \code{scalar} to \code{x}. Result is \code{x} with \code{x@content[1]} replaced by \code{x@content[1]+scalar}. } \item{\code{x*scalar}:}{ Multiply \code{x} by \code{scalar}. Result is \code{x} with \code{x@content[3]} replaced by \code{x@content[3]*scalar}. } \item{\code{scalar*x}:}{ Multiply \code{x} by \code{scalar}. Result is \code{x} with \code{x@content[3]} replaced by \code{x@content[3]*scalar}. } \item{\code{x[i]}:}{ Subset x. If length of \code{i} is \code{0}, the result is an object of class \code{"noneIndex"}. Otherwise, the result is an object of class \code{"sliceIndex"} or of class \code{"positiveIndex"}. } \item{dim(x) <- value}{ Set a dimension on \code{x}. If value is of length 2, this may create a "matrixIndex". } \item{\code{x[]}:}{ Subset x with the subscript missing. Result is x. } \item{\code{allNA(x)}:}{ Are all elements of \code{x} \code{NA}? Result is always \code{FALSE}. } \item{\code{anyNA(x)}:}{ Is any element of \code{x} \code{NA}? Result is always \code{FALSE}. } \item{\code{length(x)}:}{ Return the length of \code{x}. } \item{\code{length(x) <- value}:}{ Modify the length of \code{x}. If \code{value} is \code{0}, makes \code{x} an object of class \code{"noneIndex"}. Otherwise, modifies length of \code{x} to \code{value}. } \item{\code{names(x)}:}{ Returns the \code{Names} slot of \code{x}. } \item{\code{names(x) <- value }:}{ Sets the \code{Names} slot of \code{x} to \code{value}. } } } \keyword{classes}