fcs_combine: Combining Ex-situ and In-situ gap analysis results in one...

Description Usage Arguments Value References Examples

View source: R/fcs_combine.R

Description

Concatenates the SRSin, GRSin, ERSin, SRSex, GRSex, ERSex and Final conservation scores in one unique CSV file with a combined conservation score using the minimun, average and maximum values between FCSin and FCSex scores and provides final conservation categories based on the scores above mentioned.

Usage

1
fcs_combine(species, Workspace, run_version)

Arguments

species

A name species compiled using '_' to call occurrences files from Workspace/parameter/occurrences folder

Workspace

A forder where the pipeline will be executed

run_version

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

Value

It returns a data frame file saved at gap_analysis folder with nive fields:

ID Species name
FCSex Ex-situ final conservation score
FCSin In-situ final conservation score
FCSc_min Final conservation score mininum value between FCSin and FCSex
FCSc_max Final conservation score maximum value between FCSin and FCSex
FCSc_mean Final conservation score average value between FCSin and FCSex
FCSc_min_class Final conservation category using FCSc_min value
FCSc_max_class Final conservation category using FCSc_max value
FCSc_mean_class Final conservation category using FCSc_mean value

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
fcs_combine('Cucurbita_digitata',Workspace,'v1')

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

 run_version <-'v1'
lapply(1:length(species_list),function(i){
   species <- species_list[[i]]
   x <- fcs_combine(species,Workspace,run_version)
   print(paste0(species,' DONE!'))
})

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