prohibit_vector_recycling: Prohibit vector recyling

Description Usage Arguments Value Source Examples

Description

Tests (harshly) whether the vectors can be recycled safely.

Usage

1

Arguments

...

A list of vectors

Value

An error message if the vectors are of different length (unless the alternative length is 1).

Source

http://stackoverflow.com/a/9335687/1664978

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
# Returns nothing because they are of the same length
prohibit_vector_recycling(c(2, 2), c(2, 2))
# Returns nothing also, because the only different length is 1
prohibit_vector_recycling(c(2, 2), 1)
# Returns an error:
prohibit_vector_recycling(c(2, 2), 1, c(3, 3, 3))

## End(Not run)

HughParsonage/grattanCharts documentation built on May 8, 2019, 10:52 a.m.