View source: R/kuenm_varcomb.R
kuenm_varcomb | R Documentation |
kuenm_varcomb creates multiple sets of variables by grouping them in all their potential combinations.
kuenm_varcomb(var.dir, out.dir, min.number = 2, in.format = "ascii",
out.format = "ascii")
var.dir |
(character) the name of the folder containing variables that will be combined. |
out.dir |
(character) the name of the folder in which subfolders with distinct combinations of variables will be written. |
min.number |
(integer) the minimum number of variables per combination. This number must be > 1. Default = 2. |
in.format |
(character) format of variables in |
out.format |
(character) format of variables to be written in distinct sets inside |
Sest of variables are written in the working directory and not retained as RasterStacks to avoid problems related to RAM limitations.
Time of processing will be reduced considerably if in.format
and out.format
coincide
because files will be copied and not loaded and written.
A list containing vectors of all the potential combinations of variables. In addition, a folder
named out.dir
with subfolders in which distinct combinations of variables produced are written.
# This example depends on data stored in your directory
var_dir <- "Variables" # your directory with variables to be combined
out_dir <- "M_variables" # output directory to be created
min_n <- 2
in_format <- "ascii"
out_format <- "GTiff"
comb <- kuenm_varcomb(var.dir = var_dir, out.dir = out_dir, min.number = min_n,
in.format = in_format, out.format = out_format)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.