prepare_sets: Prepare sets of variables for calibration

View source: R/prepare_sets.R

prepare_setsR Documentation

Prepare sets of variables for calibration

Description

Prepare sets of variables for calibration

Usage

prepare_sets(variables, sets = NULL, all_combinations = FALSE,
             minvar_perset = 2, format_in = NULL, save = FALSE,
             format_out = "GTiff", overwrite = FALSE,
             output_directory = "Variable_sets")

Arguments

variables

(character or RasterStack) if character, name of the folder containing only the variables to be subsetted; if RasterStack, stack of variables to be subsetted.

sets

named list of character vectors with the names of the variables per each subset. Default = NULL.

all_combinations

(logical) whether or not to prepare sets based on all potential combinations of two or more variables. Ignored if sets is defined and default = FALSE changes to TRUE if sets = NULL.

minvar_perset

(integer) if all_combinations = TRUE and sets is not defined, minimum number of variables per combination. This number must be > 1. Default = 2.

format_in

(character) if variables is character, format of the variables found in the folder. Default = NULL.

save

(logical) wheter or not to write sets of variables in a subfolder in the working directory. Default = FALSE.

format_out

(character) format of the variables to be written in output_directory if save = TRUE. Default = "GTiff".

overwrite

(logical) whether or not to overwrite exitent results in output_directory if save = TRUE. Default = FALSE.

output_directory

name of the folder were subsets will be written if save = TRUE. Default = "Variable_sets".

Value

A list of character vectors containing the names of the variables to be used in each set. A folder with subfolders (sets) and variables subsetted.


marlonecobos/ellipsenm documentation built on Oct. 18, 2023, 8:09 a.m.