firstN: Return the first 'n' elements. If 'n' is greater than...

Description Usage Arguments Examples

Description

Return the first n elements. If n is greater than length, then return the whole vector or list.

Usage

1
firstN(vect, n)

Arguments

vect

A Vector or List.

n

The first n elements.

Examples

1
2
first.n <- firstN(1:10, 3)
firstN(1:10, 20)

walterxie/ComMA documentation built on May 3, 2019, 11:51 p.m.