R/pr_compute_indexes.R
    pr_compute_indexes.Rdfunction used to compute spectral indexes, given the indexes formula
pr_compute_indexes( in_file, out_file, out_format = "GTiff", indexes, cust_indexes = NULL, overwrite = FALSE )
| in_file | `character` path of the file to be used for computing indexes | 
|---|---|
| out_file | `character` output path - filenames are created adding a suffix to the basename of this file (e.g., S:/mypath/myoutfile_NDVI.tif) | 
| out_format | `character`` ["GTiff" | "ENVI"], Output format, Default: 'GTiff' | 
| indexes | `character` array of names of indexes to be computed. You can see a list of available indexes using command `pr_listindexes()`, or see the corresponding table at: https://irea-cnr-mi.github.io/prismaread/articles/Computing-Spectral-Indexes.html #nolint | 
| cust_indexes | `character` named list containing names and formulas of custom indexes to be computed. The indexes formulas must be computable R formulas, where bands are referred to by the prefix "b", followed by the wavelength (e.g., `cust_indexes = list(myindex1 = "R500 / R600", myindex2 = "(R800 - R680) / (R800 + R680)")` | 
| overwrite | `logical` if TRUE, existing files are overwritten, default: FALSE | 
NULL - new raster file saved in out_filename
the function parses the index formula to identify the required bands. On the basis of identified bands, it retrieves the reflectance bands required, gets the data into R raster objects, performs the computation and stores results in a GeoTiff or ENVI raster file
License: GPL 3.0
Lorenzo Busetto, phD (2017)
Luigi Ranghetti, phD (2017)