variable_frequency_epiweek: Simple log odds freqency plot for given variable. Does not...

Description Usage Arguments Value

View source: R/frequency0.R

Description

If the column 'weight' is in the input data frame, this will use the values to weight each observation. If computing for genotypes you will want to remove gaps and 'X' before passing to this function; also deduplicate by patient id.

Usage

1
2
3
4
5
6
7
8
9
variable_frequency_epiweek(
  s,
  variable = "genotype",
  value = "mutant",
  mint = -Inf,
  maxt = Inf,
  detailed = TRUE,
  form = y ~ s(sample_time, bs = "gp", k = 5)
)

Arguments

s

data frame which must contain sample_time and 'variable' for each sequence

variable

Column of s which contains variable to split the data

value

The value in conlumn 'variable' for which we will compute frequency

mint

Minimum sample time to include

maxt

Max time to include

form

formula passed to mgcv::gam for estimating frequencies

Value

list with data, plots, and estimated frequencies


emvolz-phylodynamics/variantAnalysis documentation built on Nov. 13, 2021, 7:16 p.m.