fm.seqR Documentation

Sequence Generation

Description

fm.seq.int creates a FlashR vector with a sequence of numbers. fm.seq.matrix creates a FlashR matrix with a sequence of numbers.

Usage

fm.seq.int(from, to, by)

fm.seq.matrix(from, to, nrow, ncol, byrow = FALSE)

Arguments

from

the starting value of the sequence.

to

the end value of the sequence.

by

number. increment of the sequence.

nrow

the number of rows in the generated matrix.

ncol

the number of columns in the generated matrix.

byrow

logical. If FALSE (the default) the matrix is filled by columns, otherwise the matrix is filled by rows.

Value

a FlashR vector or matrix filled with a sequence of numbers that belongs to [from, to]

Author(s)

Da Zheng <dzheng5@jhu.edu>

Examples

vec <- fm.seq.int(1, 10, 1) # create a FlashR vector of 10 elements whose values are from 1 to 10.
mat <- fm.seq.matrix(1, 20, 10, 2) # create a 10x2 FlashR matrix whose rows are sequence numbers from 1 to 10.