Learn R Programming

splusTimeDate (version 2.5.8)

numericSequence: Constructor for numericSequence Class

Description

Constructs numericSequence objects.

Usage

numericSequence(from, to, by, length.)

Value

returns a numericSequence object with properties given by the arguments, or the default numericSequence if no arguments are supplied.

Arguments

from

start of the sequence.

to

end of the sequence.

by

increment for the sequence.

length.

length of the sequence; a non-negative integer.

Details

At least three of the four arguments must be supplied, unless the function is called with no arguments.

See Also

numericSequence class.

Examples

Run this code
numericSequence()
# The following all produce a sequence running from 1 to 10:
numericSequence(1, 10, 1)
numericSequence(1, by = 1, length = 10)
numericSequence(1, 10, length = 10)
numericSequence(to = 10, by = 1, length = 10)

Run the code above in your browser using DataLab