prep_predata | R Documentation |
Creation of predata, a data.frame containing environmental parameters in a grid of the study area. Also it allows to impute missing data for predata and segdata using PCA from the missMDA package or Amelia from Amelia package.
prep_predata( segdata, gridfile_name, varenviro, do_log_enviro, varphysio, do_log_physio, imputation = "Amelia", shape, saturate_predata = F, saturate_segdata = F, inbox_poly = T, col2keep = NULL, verbose = TRUE )
segdata |
"Segdata" data.frame, built with |
gridfile_name |
Grid of the study area with all the environmental variables which allows to build predata. |
varenviro |
Vector containing all dynamic environmental variables (e.g. chlorophyl, SST). |
do_log_enviro |
Vector precising which variables among varenviro that are necessary
to transform to neperian logarithm + 1 ( |
varphysio |
Vector containing non-dynamic environmental variables (i.e depth, dist200m). |
do_log_physio |
Vector precising which variables among varphysio that are necessary
to transform to neperian logarithm + 1 ( |
imputation |
Data imputation method to missing values of segdata and predata. 2 methods allowed :
Default method is PCA. |
shape |
Shapefile of the study area. It can be either a |
saturate_predata |
Boolean. If |
saturate_segdata |
Boolean. If |
inbox_poly |
When |
col2keep |
|
verbose |
Boolean. whether or not to display the progress bar for "PCA" or iteration number for "amelia". |
This function return a list containing :
predata : data.frame of predata. Corresponding to gridata keeping covariates, coordinates and area of cells
segdata : data.frame of segdata.
pca_seg : Output of PCA
function on predata.
pca_pred : Output of PCA
function on segdata.
seg_mipat : output of VIM::aggr on predata
pred_mipat : output of VIM::aggr on segdata
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.