Select2FramingValues: Select the 2 framing values around a given value

View source: R/Select2FramingValues.R

Select2FramingValuesR Documentation

Select the 2 framing values around a given value

Description

Select the 2 framing values around a given value

Usage

Select2FramingValues(i, Y, X)

Arguments

i

Position of the value from which to find the framing values

Y

Vector of values of the variable from which to select the 2 values around i (numeric)

X

Vector of values of the explanatory variable of the variable Y (thus also to filter) (numeric)

Value

2 vectors of 2 values each (list):

  • yval: the 2 Y values around i

  • xval: the 2 X values corresponding to the two yval values

Examples

DBHCor = c(17.7, 26.2, NA, 34.6, 34.6, 34.6, 38.0)
Time = c(1998, 2008, 2016, 2017, 2018, 2019, 2021)

Select2FramingValues(i = 3, Y = DBHCor, X = Time)


VincyaneBadouard/TreeData documentation built on Jan. 4, 2024, 2:56 a.m.