Shows is a vector is related to bare/fallow land..
findBare(x, y)
A numeric vector.
A numeric element.
A logical element.
The function computes the amplitude of x and returns TRUE if this value is below the threshold given by y.
# 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