set_length: Checks and sets object length to correct length

Description Usage Arguments Details

Description

Checks and sets object length to correct length

Usage

1
set_length(x, lx = y, name = "")

Arguments

x

object to check

lx

length it should be

name

Optional name to add in for output message

Details

Internal function that checks whether object is either of length 1 or equal to some longer length, such as the number of layers in a RasterBrick. If it is between those numbers, it sets the object equal to the first element.


PrincetonUniversity/agroEcoTradeoff documentation built on May 8, 2019, 3:12 p.m.