create_folder_structure: Creating folder and subfolder structure for a species list...

Description Usage Arguments Value References Examples

Description

Creates the output folders structure for each species to host results obtained by the gap analysis pipeline This function is used internally in the create_folder_structure function when an initial species list is provided

Usage

1
2
create_folder_structure(species_list, dir, run_version, initial,
  create_sp_dirs)

Arguments

species_list

A list of species to be analyzed when a species list is provided

dir

A forder to run the gap analysis including inputs and outputs

run_version

The version of the analysis used (e.g 'v1')

initial

(logical) The function will create the initial folder structure for the analysis

create_sp_dirs

(logical) The function will create folder for each species outputs in /gap_anaylsis

Value

It returns a folder structure with the following subfolder schema:

workspace species name as species parameter
└───parameters #Folder where the inputs are hosted
│ ├───raster # Subfolder to add mask, protected areas and ecoregions shapefile
│ ├───occurrences #Folder where a CSV file is used to filter species accessions occurrences
└───gap_analysis #Folder where results will be saved if create_sp_dirs=T

Sources used for analysis were obtained from Khoury et al., 2019 using the following download links:

Protected area http://dx.doi.org/10.17632/2jxj4k32m2.1#file-fc8ffd3f-8d79-481b-9ccf-4cf19b8480ec
World mask http://dx.doi.org/10.17632/2jxj4k32m2.1#folder-1b61c978-5753-4ab6-bbc7-11f8e4b062cf
Terrestrial ecoregions http://maps.tnc.org/files/shp/terr-ecoregions-TNC.zip

References

Khoury, C. K., Amariles, D., Soto, J. S., Diaz, M. V., Sotelo, S., Sosa, C. C., … Jarvis, A. (2019). Comprehensiveness of conservation of useful wild plants: An operational indicator for biodiversity and sustainable development targets. Ecological Indicators. https://doi.org/10.1016/j.ecolind.2018.11.016

Khoury, C. K., Amariles, D., Soto, J. S., Diaz, M. V., Sotelo, S., Sosa, C. C., … Wiersema, J. H. (2019). Data for the calculation of an indicator of the comprehensiveness of conservation of useful wild plants. Data in Brief, 22, 90–97. https://doi.org/10.1016/j.dib.2018.11.125

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
create_folder_structure(species_list,dir,run_version,initial=F,create_sp_dirs=T)

 dir  <-  'E:/CIAT/workspace/Workspace_test'
 run_version  <- 'v1'
 species_list <- c('Cucurbita_cordata',
  'Cucurbita_digitata',
  'Cucurbita_foetidissima',
  'Cucurbita_palmata')

 x <- create_folder_structure(species,dir,run_version,initial=F,create_sp_dirs=F)

dcarver1/gapAnalysisR documentation built on Feb. 29, 2020, 12:13 p.m.