View source: R/cardinal_dates.R
pa_cardinal_dates | R Documentation |
Predict cardinal dates from satellite image data
pa_cardinal_dates(x, ...)
## S3 method for class 'numeric'
pa_cardinal_dates(
x,
y,
baseline.months = c(1:3, 12),
model = c("none", "card3", "scard3", "agauss", "harmonic"),
prior.means,
prior.vars,
bias.correction,
...
)
## S3 method for class 'Date'
pa_cardinal_dates(
x,
y,
baseline.months = c(1:3, 12),
model = c("none", "card3", "scard3", "agauss", "harmonic"),
prior.means,
prior.vars,
bias.correction,
...
)
## S3 method for class 'veg.index'
pa_cardinal_dates(
x,
y = NULL,
baseline.months = c(1:3, 12),
model = c("none", "card3", "scard3", "agauss", "harmonic"),
prior.means,
prior.vars,
bias.correction,
...
)
x |
vector containing the date or day of the year of that the satellite data was collected |
... |
ignored |
y |
vector containing the satellite data value |
baseline.months |
vector containing the months used as a baseline reference for when there are no crops in the field. For example, c(1:3, 12) represent Jan, Feb, Mar, and Dec. |
model |
a string naming the model to be used to estimate cardinal dates |
prior.means |
a vector of length three containing the prior means for cardinal dates |
prior.vars |
a vector of length three containing the prior variances for cardinal dates |
bias.correction |
a vector of length three containing the bias correction factor for cardinal dates |
when x is a vector, returns a vector of length 3 with the predicted cardinal dates. When x is a veg.index object, returns a stars object with spatially distributed cardinal dates
## Not run:
x <- seq(1, 365, 6)
y <- nlraa::scard3(x, 120, 210, 300)
pa_cardinal_dates.vector(
x = x,
y = y,
model = 'scard3',
prior.means = c(130, 190, 297),
prior.vars = c(11, 13, 18),
bias.correction = c(10, 10, 10)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.