HACSim (version 1.0.1)

envr: Simulation variable storage environment

Description

envr is a new (initially empty) environment that is created when HACSim is loaded.

Arguments

Value

When a simulation is run via HAC.simrep, envr will contain 20 elements as follows:

conf.level

The desired confidence level. Default is conf.level = 0.95.

d

A dataframe with three columns: specimens (specs), accumulated haplotypes (means), and standard deviation (sd)

filename

The name of the file where results are to be saved. Default is NULL.

high

The upper endpoint of the desired level confidence interval for the 'true' required sample size

Hstar

Number of unique species' haplotypes

input.seqs

Should DNA sequences be inputted? Default is FALSE.

iters

The number of iterations required to reach convergence

low

The upper endpoint of the desired level confidence interval for the 'true' required sample size

N

The starting sample size used to initialize the algorithm

Nstar

The final (extrapolated) sample size

p

The user-specified level of haplotype recovery. Default is p = 0.95.

perms

The user-specified number of permutations (replications). Default is perms = 10000.

probs

Haplotype frequency distribution vector

progress

Should iteration results be outputted to the console? Default is TRUE.

prop.haps

If subset.haps = TRUE, the user-specified proportion of haplotype labels to recover

prop.seqs

If subset.seqs = TRUE, the user-specified proportion of DNA sequencess to recover

ptm

A timer to track progress of the algorithm in seconds

R

The proportion of haplotypes recovered by the algorithm

subset.haps

Should a subsample of haplotype labels be taken? Default is FALSE.

subset.seqs

Should a subsample of DNA sequences be taken? Default is FALSE.

Examples

Run this code
# NOT RUN {
# Returns the frequencies of each haplotype in the extrapolated sample 
max(envr$d$specs) * envr$probs

# Returns the extrapolated sample size corresponding to the dotted line 
# in the last iteration plot
envr$d[which(envr$d$means >= envr$p * envr$Hstar), ][1, 1]
# }

Run the code above in your browser using DataLab