R/summarize_gene.R
summarize_gene.Rd
Calculate the distribution of susceptibilities by gene.
summarize_gene(x, cutoff, control, sample, gene, perc_susc)
a data.frame
containing the data.
value for percent susceptible cutoff. Numeric
.
value used to denote the susceptible control in the gene
column. Character
.
column providing the unique identification for each sample
being tested. Character
.
column providing the gene(s) being tested. Character
.
column providing the percent susceptible reactions.
Character
.
returns an object of class
hagis.gene.summary
An object of class hagis.gene.summary
is a
containing the following components columns
the gene
the total number virulent isolates for a given
gene in the gene
column
the frequency with which a gene is pathogenic
if (FALSE) { # interactive()
# Using the built-in data set, `P_sojae_survey`
data(P_sojae_survey)
P_sojae_survey
# calculate susceptibilities with a 60 % cutoff value
susc <- summarize_gene(x = P_sojae_survey,
cutoff = 60,
control = "susceptible",
sample = "Isolate",
gene = "Rps",
perc_susc = "perc.susc")
susc
}