sits_to_xlsx | R Documentation |
Saves confusion matrices as Excel spreadsheets. This function
takes the a list of accuracy assessments generated
by sits_accuracy
and saves them in an Excel spreadsheet.
sits_to_xlsx(acc, file)
## S3 method for class 'sits_accuracy'
sits_to_xlsx(acc, file)
## S3 method for class 'list'
sits_to_xlsx(acc, file)
acc |
Accuracy statistics (either an output of sits_accuracy or a list of those) |
file |
The file where the XLSX data is to be saved. |
No return value, called for side effects.
Please refer to the sits documentation available in <https://e-sensing.github.io/sitsbook/> for detailed examples.
Gilberto Camara, gilberto.camara@inpe.br
if (sits_run_examples()) {
# A dataset containing a tibble with time series samples
# for the Mato Grosso state in Brasil
# create a list to store the results
results <- list()
# accuracy assessment lightTAE
acc_ltae <- sits_kfold_validate(samples_modis_ndvi,
folds = 5,
multicores = 1,
ml_method = sits_lighttae()
)
# use a name
acc_ltae$name <- "LightTAE"
# put the result in a list
results[[length(results) + 1]] <- acc_ltae
# save to xlsx file
sits_to_xlsx(
results,
file = tempfile("accuracy_mato_grosso_dl_", fileext = ".xlsx")
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.