Format datasets for the recruitment analysis. Note that this function was used at a early stage if the development.

formatData(fl_trees, fl_regen, fl_favo, treesp = unique(simuDesign$tree),
  abbr_site = "abi", path_out = "output", dist_buffer = 20,
  export = TRUE)

Arguments

fl_trees

a character string indicating path to the .csv file including the georeferenced trees.

fl_regen

a character string indicating path to the .csv file including regeneration data for 2015 and 2016.

fl_favo

a character string indicating path to the .csv file including favourability data.

treesp

a vector of abbreviation indicating the tree species considered.

abbr_site

a character string giving the abbreviation of the site considered.

path_out

a character string indicating the path to write the data files.

dist_buffer

the buffering distance (in meters).

export

logical. If TRUE, then formatted data are written as .rds files.

Value

A list of datasets including a set of trees and their spatial coordinates, 2 #' 'regen files: one for 2015 and the other for 2016 including the seedling recruitment and the favourability of all plots and also all distances between plots and trees and a list of trees included in a buffer.