Extract layers and create power wanted of each variable

extract_var_JSDM(
  stars_object,
  variables_names,
  power_variable = rep(1, length(variables_names)),
  scale = rep(TRUE, length(variables_names))
)

Arguments

stars_object

stars object. output of "read_stars" of "stars" library with layer's names.

variables_names

a character vector. of layer's name needed

power_variable

int vector same length then `variables_names` . maximal power needed for each variable

scale

boolean vector same length then `variables_names` . scale variables and its power

Value

stars object with only variables and power asked.