View source: R/func__geoTempAnalyser__countAllelesPerYear.R
countAllelesPerYear | R Documentation |
Count alleles per year
countAllelesPerYear( alleles = NULL, sam, mapping, apam, nul_count = NA, nul_freq = NA, combine = NULL )
alleles |
A character vector of allele names. |
sam |
A data frame of sample information. Required columns: Strain, Country, Year_low and Year_up. |
mapping |
A data frame in the output of lmm or findPhysLink. |
apam |
Allelic presence-absence matrix. |
nul_count |
A value for zero counts. It can be zero definitely, but setting it to NA makes it easier to draw a heat map. |
nul_freq |
A value for zero frequency. |
combine |
A named list defining periods when counts of each allele are added up to make a new count. Each element in this list is an integer vector of years. For example, combine = list("1985-2005" = c(1985, 1986, 1988, 2005)). The vector must not contain a single element. |
A list of three elements: count, freq, n (number of strains per year), w (weighted counts per strain) and mapping. When combine is a list, another two elements called comb_count, comb_freq and period are included.
Yu Wan (wanyuac@126.com)
a_yr <- countAllelesPerYear(alleles = nwk$V$allele, sam = sam, mapping = assoc$mapping, apam = assoc$alleles$A, nul = -30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.