rOPTRAM uses several package options. This function displays the current defined options, (showing the default options when the package is first loaded), and allows users to set new values for each option.
Note
When no new option name or value is specified, a list of currently defined options is printed.
rOPTRAM defines the following options at startup
opt_name | default | other possible values |
—————- | ————— | ——————- |
veg_index | "NDVI" | "SAVI", "MSAVI" |
remote | "scihub" | "openeo" |
period | "full" | "seasonal" |
max_cloud | 12 | between 0 and 100 |
vi_step | 0.005 | usually between 0.01 and 0.001 |
trapezoid_method | "linear" | "polynomial" or "exponential" |
SWIR_band | 11 | 12 |
max_tbl_size | 1e+6 | depends on computer resources |
rm.low.vi | FALSE | TRUE |
rm.hi.str | FALSE | TRUE |
plot_colors | "no" | "no" = uniform green color for all points |
"features" = points colored by aoi features | ||
"density" = points colored by point density | ||
"contours" = plots density contour lines | ||
"months" = points colored by month of image date | ||
feature_col | "ID" | string, name of numeric column |
that contains feature ID's for coloring plot | ||
edge_points | TRUE | FALSE, whether to add |
the trapezoid edge points to the plot | ||
overwrite | FALSE | Set to TRUE to re-download already acquired S2 images |
Examples
opts <- options()
optram_options() # prints out list of current options
#> [1] "SWIR_band = 11"
#> [1] "edge_points = TRUE"
#> [1] "feature_col = ID"
#> [1] "max_cloud = 12"
#> [1] "max_tbl_size = 1e+06"
#> [1] "overwrite = FALSE"
#> [1] "period = full"
#> [1] "plot_colors = no"
#> [1] "remote = scihub"
#> [1] "rm.hi.str = FALSE"
#> [1] "rm.low.vi = FALSE"
#> [1] "trapezoid_method = linear"
#> [1] "veg_index = NDVI"
#> [1] "vi_step = 0.005"
#> NULL
optram_options("SWIR_band", 12)
#>
#> New option for SWIR_band applied.
#> [1] "SWIR_band = 12"
#> [1] "edge_points = TRUE"
#> [1] "feature_col = ID"
#> [1] "max_cloud = 12"
#> [1] "max_tbl_size = 1e+06"
#> [1] "overwrite = FALSE"
#> [1] "period = full"
#> [1] "plot_colors = no"
#> [1] "remote = scihub"
#> [1] "rm.hi.str = FALSE"
#> [1] "rm.low.vi = FALSE"
#> [1] "trapezoid_method = linear"
#> [1] "veg_index = NDVI"
#> [1] "vi_step = 0.005"
optram_options("veg_index", "SAVI")
#>
#> New option for veg_index applied.
#> [1] "SWIR_band = 12"
#> [1] "edge_points = TRUE"
#> [1] "feature_col = ID"
#> [1] "max_cloud = 12"
#> [1] "max_tbl_size = 1e+06"
#> [1] "overwrite = FALSE"
#> [1] "period = full"
#> [1] "plot_colors = no"
#> [1] "remote = scihub"
#> [1] "rm.hi.str = FALSE"
#> [1] "rm.low.vi = FALSE"
#> [1] "trapezoid_method = linear"
#> [1] "veg_index = SAVI"
#> [1] "vi_step = 0.005"
optram_options("trapezoid_list", "exp") # fails
#>
#> Unknown option name: trapezoid_list
options(opts)