genotype_curve(gen, sample = 100, maxloci = 0L, quiet = FALSE, thresh = 1, plot = TRUE)
genclone
, genind
, or
loci
object.integer
defining the number of times loci will be
resampled without replacement.maxloci = 0
, which indicates that n - 1 loci are to be used. Note
that this will always take min(n - 1, maxloci)FALSE
(default), Progress of the iterations will be
displayed. If TRUE
, nothing is printed to screen as the function
runs.TRUE
(default), the genotype curve will be plotted via
ggplot2. If FALSE
, the resulting matrix will be visibly returned.loci
object, which represents genotypes as a data
frame of factors. Random samples are taken of 1 to n-1 columns of the
matrix and the number of unique rows are counted to determine the number of
multilocus genotypes in that random sample. This function does not take
into account any definitions of MLGs via mlg.filter
or
mll.custom
.
data(nancycats)
nan_geno <- genotype_curve(nancycats)
## Not run:
# # With AFLP data, it is often necessary to include more markers for resolution
# data(Aeut)
# Ageno <- genotype_curve(Aeut)
# # Trendlines: you can add a smoothed trendline with geom_smooth()
# library("ggplot2")
# p <- last_plot()
# p + geom_smooth()
#
# # Many microsatellite data sets have hypervariable markers
# data(microbov)
# mgeno <- geotype_curve(microbov)
#
# # This data set has been pre filtered
# data(monpop)
# mongeno <- genotype_curve(monpop)
#
# # Here, we add a curve and a title for publication
# p <- last_plot()
# mytitle <- expression(paste("Genotype Accumulation Curve for ",
# italic("M. fructicola")))
# p + geom_smooth() +
# theme_bw() +
# theme(text = element_text(size = 12, family = "serif")) +
# theme(title = element_text(size = 14)) +
# ggtitle(mytitle)
# ## End(Not run)
Run the code above in your browser using DataLab