Learn R Programming

gpuR (version 2.0.6)

slice: Vector Slices

Description

This doesn't create a copy, it provides a child class that points to a contiguous subvector of a gpuVector or vclVector. Non-contiguous slices are currently not supported.

Usage

slice(object, start, end)

# S4 method for gpuVector,integer,integer slice(object, start, end)

# S4 method for vclVector,integer,integer slice(object, start, end)

Value

A gpuVectorSlice or vclVectorSlice object.

Arguments

object

A gpuVector or vclVector object

start

An integer indicating the start of slice

end

An integer indicating the end of slice

Author

Charles Determan Jr.

Details

This function allows a user to create a gpuR vector object that references a continuous subset of columns and rows of another gpuR vector object without a copy.

NOTE - this means that altering values in a vector slice object will alter values in the source vector.