set_length: Checks and sets object length to correct length

Description Usage Arguments Details

View source: R/utilities.R

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.


marcusspiegel/agroEcoTradeoff documentation built on May 21, 2019, 11:44 a.m.