prep_incidence_data: prep_incidence_data Function to prepare incidence data with...

View source: R/prep_incidence_data.R

prep_incidence_dataR Documentation

prep_incidence_data Function to prepare incidence data with distance data to model. Takes the species in the incidence data and join with a sample form the distance data. This allow to get a dataset ready to model with ML framework

Description

prep_incidence_data Function to prepare incidence data with distance data to model. Takes the species in the incidence data and join with a sample form the distance data. This allow to get a dataset ready to model with ML framework

Usage

prep_incidence_data(incidence, distance, by = "species")

Arguments

incidence

A data.frame object with incidence per species

distance

A data.frame with enviromental, geographical and phylogenetic median distance

by

A character vector of variables to join by. The distance table and the incidence table must have an species column

Value

A data.frame with data prepare to model. Includes a sample of median distance labeled as unknown class and incidence species labeled as susceptible class

Examples

library(ecointeraction)
birdsplasmodium %>%
    acummulate_incidence(group = species) %>%
    cutoff_incidence() %>%
    prep_incidence_data(distance  = birdsdistance)

alrobles/PNASSubmit-Wildlife-susceptibility-to-infectious-diseases-at-global-scales documentation built on Aug. 2, 2022, 5:15 p.m.