finite_head_prop: Subset generators

View source: R/models.R

finite_head_propR Documentation

Subset generators

Description

Subset generators

Usage

finite_head_prop(x, y, prop_tail = 1)

finite_tail_prop(x, y, prop_head = 1)

finite_tail(x, y, n_tail = sum(is.finite(x) & is.finite(y)))

finite_head(x, y, n_head = sum(is.finite(x) & is.finite(y)))

Arguments

x

An independent variable like depth or cumulative dry mass.

y

A dependent variable that responds exponentially to x.

prop_tail, prop_head

A minimum proportion of finite values that should be included in the output

n_tail, n_head

A minimum number of finite values that should be included in the output

Value

A logical vector that can be used to subset x and y.

Examples

x <- 1:5
y <- c(1, 2, NA, NA, 5)

finite_head(x, y, 2)
finite_tail(x, y, 2)
finite_head_prop(x, y, 0.5)
finite_tail_prop(x, y, 0.5)


paleolimbot/pb210 documentation built on May 8, 2022, 8:10 a.m.