longestVec {calACS}R Documentation

The function takes in multiple vectors of any length, and returns the one with the longest length. The tieBreaker variable controls if the first or the last of the longest vectors gets returned in case there are multiple

Description

The function takes in multiple vectors of any length, and returns the one with the longest length. The tieBreaker variable controls if the first or the last of the longest vectors gets returned in case there are multiple

Usage

longestVec(..., tieBreaker = "last")

Arguments

...

vectors of any length

tieBreaker

decides if the first or the last longest vector gets returned if there are multiple longest vectors. Can be either 'first' or 'last'. Default to 'last'.

Examples

longestVec(1:5, c('a','b'))


[Package calACS version 2.2.2 Index]