matlabColon: Simulate Matlab's ':'

View source: R/ffmanova_div.R

matlabColonR Documentation

Simulate Matlab's ‘:’

Description

A function to simulate Matlab's ‘:’ operator.

Usage

matlabColon(from, to)

Arguments

from

numeric. The start value.

to

numeric. The end value.

Details

matlabCode(a,b) returns a:b ('s version) unless a > b, in which case it returns integer(0).

Value

A numeric vector, possibly empty.

Author(s)

Bjørn-Helge Mevik

See Also

seq

Examples


identical(3:5, matlabColon(3, 5)) ## => TRUE
3:1 ## => 3 2 1
matlabColon(3, 1) ## => integer(0)


bhmevik/ffmanova documentation built on Oct. 23, 2023, 9:45 a.m.