Conducts jackknife resampling using a genlight object
Jackknife resampling is a statistical procedure where for a dataset of sample size n, subsamples of size n-1 are used to compute a statistic. The collection of the values obtained can be used to evaluate the variability around the point estimate. This function can take the loci, the individuals or the populations as units over which to conduct resampling.
boldNote that when n is very small, jackknife resampling is not recommended.
Parallel computation is implemented. The argument coden.cores indicates the number of core to use. If "auto" [default], it will use all but one available cores. If the number of units is small (e.g. a few populations), there is not real advantage in using parallel computation. On the other hand, if the number of units is large (e.g. thousands of loci), even with parallel computation, this function can be very slow.
utils.jackknife( x, FUN, unit = "loc", recalc = FALSE, mono.rm = FALSE, n.cores = "auto", verbose = NULL, ... )
Name of the genlight object containing SNP genotypes [required].
the name of the function to be used to calculate the statistic
The unit to use for resampling. One of c("loc", "ind", "pop"): loci, individuals or populations
Recalculate the locus metadata statistics [default FALSE].
Remove monomorphic loci [default FALSE].
The number of cores to use. If "auto" [default], it will use all but one available cores.
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity].
any additional arguments to be passed to FUN
Custodian: Carlo Pacioni -- Post to https://groups.google.com/d/forum/dartr
require("dartR.data") platMod.gl <- gl.filter.allna(platypus.gl) #> Starting gl.filter.allna #> Processing genlight object with SNP data #> Identifying and removing loci and individuals scored all #> missing (NA) #> Deleting loci that are scored as all missing (NA) #> Deleted #> Deleting individuals that are scored as all missing (NA) #> Completed: gl.filter.allna #> chk.pop <- utils.jackknife(x=platMod.gl, FUN="gl.alf", unit="pop", recalc = FALSE, mono.rm = FALSE, n.cores = 1, verbose=0) #> Starting gl.set.verbosity #> Global verbosity set to: 2 #> Completed: gl.set.verbosity #> Starting gl.set.verbosity #> Global verbosity set to: 2 #> Completed: gl.set.verbosity #> Starting gl.set.verbosity #> Global verbosity set to: 2 #> Completed: gl.set.verbosity #>