create_binary_matrix {hagis} | R Documentation |
Create Binary Data Matrix From Pathotype Data
Description
Creates a binary data matrix from pathotype data representing the pathotype of each isolate. This binary data matrix can be used to visualize beta-diversity of pathotypes using vegan and ape.
Usage
create_binary_matrix(x, cutoff, control, sample, gene, perc_susc)
Arguments
x |
a |
cutoff |
value for percent susceptible cutoff. |
control |
value used to denote the susceptible control in the |
sample |
column providing the unique identification for each sample
being tested. |
gene |
column providing the gene(s) being tested. |
perc_susc |
column providing the percent susceptible reactions.
|
Value
a binary matrix of pathotype data
Examples
# Using the built-in data set, `P_sojae_survey`
data(P_sojae_survey)
P_sojae_survey
# calculate susceptibilities with a 60 % cutoff value
final_matrix <- create_binary_matrix(x = P_sojae_survey,
cutoff = 60,
control = "susceptible",
sample = "Isolate",
gene = "Rps",
perc_susc = "perc.susc")
final_matrix
[Package hagis version 3.1.12 Index]