Description Usage Arguments Details Value Examples
View source: R/data_analysis.R
Ne
calculates the effective population size (Ne) between yr0
and yrt
for several scenarios based on the loss of genetic diversity
(expected heterozygosity) using the temporal approach.
1 2 3 4 5 6 7 8 9 10 |
data |
The output from |
scenarios |
A vector of scenario names for which Ne needs to be calculated, default: 'all' |
gen |
The generation time express in years |
yr0, yrt |
The time window to be considered (first and last year respectively) |
save2disk |
Whether to save the output to disk, default: TRUE |
fname |
The name of the files where to save the output, defult: 'Ne' |
dir_out |
The local path to store the output. Default: DataAnalysis |
yr0
is adjusted by adding the number of years of the generation time
(rounded to the nearest integer). In this way the user can provide the same
yr0,yrt
and gen
to Nadults
and Ne
and these
values are adjusted internally to correctly calculate the Ne/N ratios where
relevant. If this behaviour is not desired, use gen=0
.
NOTE: When a population goes extinct, the results of the calculations are spurious (they are 0.5). This may change in future versions.
A data.table
(data.frame
if
data.table
is not loaded) with Ne values
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.