Run PCA or tSNE on pixels with as coordinates, probabilities of presence of species. Plot Axis 1 vs axis 2, axis 2 vs axis 3 and dendrogram. Possibility to hide plot and save it in .png.

PCA_or_tSNE_on_pro_pres_est(
  tSNE = TRUE,
  PCA = FALSE,
  list_theta_path,
  var_exp_stars = NULL,
  display_plot = TRUE,
  save_plot = FALSE
)

Arguments

tSNE

boolean. compute tSNE reduction of dimensions algorithm. If TRUE, `PCA` must be FALSE, default is TRUE.

PCA

boolean. compute PCA reduction of dimensions algorithm. If TRUE, `tSNE` must be FALSE, default is FALSE.

list_theta_path

character vector. with full path of Tiff files who contain probabilities of presence of each species to consider.

var_exp_stars

multilayer stars object. optional, only consider if `PCA` = TRUE. Plot as supplementary variables, default is NULL.

display_plot

boolean. Show plot, default is TRUE.

save_plot

boolean. Save plots in plot folder with png format.

Value

float matrix. with as much row as number of pixels and 3 columns for tSNE algorithm and as columns as number of axis with more than 1