envr {HACSim} | R Documentation |
Simulation variable storage environment
Description
envr
is a new (initially empty) environment that is created
when HACSim
is loaded.
Value
When a simulation is run via HAC.simrep
, envr
will contain
26 elements as follows:
ci.type |
Type of confidence interval to compute and plot. Default is
|
conf.level |
The desired confidence level. Default is
|
d |
A dataframe with |
df.out |
A dataframe with |
filename |
The name of the file where results are to be saved. Default is NULL. |
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 |
N |
The starting sample size used to initialize the algorithm |
Nstar |
The final (extrapolated) sample size |
Nstar.high |
The upper endpoint of the desired level confidence interval for the 'true' required sample size |
Nstar.low |
The lower endpoint of the desired level confidence interval for the 'true' required sample size |
num.iters |
Number of iterations to compute. |
p |
The user-specified level of haplotype recovery. Default is
|
perms |
The user-specified number of permutations (replications). Default
is |
probs |
Haplotype frequency distribution vector |
progress |
Should iteration results be outputted to the console? Default is TRUE. |
prop.haps |
If |
prop.seqs |
If |
ptm |
A timer to track progress of the algorithm in seconds |
R |
The proportion of haplotypes recovered by the algorithm |
R.low |
The lower endpoint of the desired level confidence interval for the 'true' fraction of haplotypes captured |
R.up |
The upper endpoint of the desired level confidence interval for the 'true' fraction of haplotypes captured |
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. |
X |
Mean number of specimens not sampled |
Examples
# 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]