DGobj-class {StrainRanking} | R Documentation |
Class "DGobj"
Description
Class of objects containing demographic and genetic data and used as input of the function ranking.strains for ranking pathogen strains.
Objects from the Class
Objects can be created by calls of the form new("DGobj", ...)
and by calls of the constructors DGobj.rawdata, DGobj.simul.mechanistic and DGobj.simul.regression.
Slots
demographic
:Object of class
"matrix"
. The first two columns give the coordinates of sites where demographic data are available. The third column gives the values of the demographic growth at these sites.genetic
:Object of class
"matrix"
. The first two columns give the coordinates of sites where genetic data are available. Each following column (3, 4, ...) gives the frequencies of a given strain at these sites.
Methods
- [
signature(x = "DGobj")
: ...- [<-
signature(x = "DGobj")
: ...- names
signature(x = "DGobj")
: ...- show
signature(object = "DGobj")
: ...- summary
signature(object = "DGobj")
: ...
Author(s)
Soubeyrand, S., Tollenaere, C., Haon-Lasportes, E. and Laine, A.-L.
References
Soubeyrand S., Tollenaere C., Haon-Lasportes E. & Laine A.-L. (2014). Regression-based ranking of pathogen strains with respect to their contributions to natural epidemics. PLOS ONE 9(1): e86591.
See Also
DGobj.rawdata, DGobj.simul.mechanistic, DGobj.simul.regression, ranking.strains
Examples
showClass("DGobj")
## load powderymildew data
data(powderymildew)
## construct a DG object from raw data
DGdata=DGobj.rawdata(demographic.coord=powderymildew$demographic.coord,
genetic.coord=powderymildew$genetic.coord,
demographic.measures=powderymildew$demographic.measures,
genetic.frequencies=powderymildew$genetic.frequencies)
## show
DGdata
## summary
summary(DGdata)
## show the demographic slot
DGdata["demographic"]
## show the genetic slot
DGdata["genetic"]
## modify the demographic slot
#DGdata["demographic"]=DGdata["demographic"][1:50,]
## names of slots
names(DGdata)