calculate_diversities {hagis}R Documentation

Calculate Diversities Indices

Description

Calculate five pathogen diversity indices.

Diversity indices include:

Usage

calculate_diversities(x, cutoff, control, sample, gene, perc_susc)

Arguments

x

a data.frame containing the data.

cutoff

value for percent susceptible cutoff. Numeric.

control

value used to denote the susceptible control in the gene column. Character.

sample

column providing the unique identification for each sample being tested. Character.

gene

column providing the gene(s) being tested. Character.

perc_susc

column providing the percent susceptible reactions. Character.

Value

a hagis.diversities object.

A hagis.diversities object is a list containing:

Examples


# Using the built-in data set, P_sojae_survey
data(P_sojae_survey)

P_sojae_survey

# calculate susceptibilities with a 60 % cutoff value
diversities <- calculate_diversities(x = P_sojae_survey,
                                     cutoff = 60,
                                     control = "susceptible",
                                     sample = "Isolate",
                                     gene = "Rps",
                                     perc_susc = "perc.susc")

diversities


[Package hagis version 3.1.12 Index]