50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

CAWaR (version 0.0.2)

findBare: findBare

Description

Shows is a vector is related to bare/fallow land..

Usage

findBare(x, y)

Arguments

x

A numeric vector.

y

A numeric element.

Value

A logical element.

Details

The function computes the amplitude of x and returns TRUE if this value is below the threshold given by y.

Examples

Run this code
# NOT RUN {
{

# vectors to test
x1 <- c(0.1,0.2,0.1,0.2,0.4,0.6,0.8,0.4,0.1) # simulated, crop profile
x2 <- c(0.1,0.3,0.2,0.2,0.1,0.3,0.1,0.2,0.2) # simulated, non-crop profile

# compare profiles
plot(x1, type="l")
lines(x2, col="red")

findBare(x1, 100) # returns TRUE
findBare(x2, 100) # returns FALSE

}
# }

Run the code above in your browser using DataLab