Learn R Programming

gmatrix (version 0.3)

gseq: Sequence

Description

Create a sequence on the GPU.

Usage

gseq(from = 1, to = 1, by = ((to - from)/(length.out - 1)), length.out = NULL, along.with = NULL, type = NULL)

Arguments

from, to
the starting and (maximal) end value of the sequence.
by
number: increment of the sequence.
length.out
desired length of the sequence. A non-negative number, which for seq and seq.int will be rounded up if fractional.
along.with
take the length from the length of this argument
type
output type (i.e. "double", "single", "integer" or "logical")

Value

returns a gvector with the specified sequence. In addition the operator %to% mimics the R base oporator :.

See Also

seq

Examples

Run this code
gseq(1,100)
1%to%10

Run the code above in your browser using DataLab