divBasic
allows the calculation of locus and overall basic population parameters. divBasic
will write results to a .xlsx workbook. The function accepts co-dominant genetic data in both 2 and 3 digit genepop formats.
divBasic(infile = NULL, outfile = NULL, gp = 3, bootstraps = NULL, HWEexact = FALSE, mcRep = 2000)
working directory
the file path must be given. The name must be a character string (i.e. enclosed in or `').infile
. Either 3 (default) or 2.bootstrap = NULL
suppresses the calculation of F_is. Users should note that setting this argument to values greater than 1000 may result in longer executions times..xlsx
files, and multiple R
objects are also written to the current environment.HWE tests can be carried out using either a standard Chisq goodness of fit method, or using Fisher's exact method. The standard chisq test behave poorly when there are classes with low numbers of observations (e.g. hypervariable microsatellite loci). In such instance it is advisable to use exact testing. Multi-locus HWE is tested using the standard chisq method by summing chisq difference and degrees of freedom across loci, and using these parameter to derive a pvalue for the test. When using exact testing, the multi-locus pvalue is determined using Fisher's method for combining pvalue from independent tests. This process assumes that loci are unlinked.
## Not run:
# # To run an example use the following format
#
# test_results <- divBasic(infile = Test_data, outfile = 'out', gp = 3, bootstraps = 1000)
# ## End(Not run)
Run the code above in your browser using DataLab