combine: Combining EMM Objects

combineR Documentation

Combining EMM Objects

Description

Combines two or more EMMs into a single object.

Usage


## S4 method for signature 'EMM'
c(x, ..., copy=TRUE, recursive = FALSE)

Arguments

x

first EMM object. Note that this object will be changed by the function if copy=FALSE!

...

further objects of the same class as x to be combined.

copy

a logical. Copy x first? Otherwise x will be changed!

recursive

a logical. If recursive=TRUE, the function recursively descends through lists combining all their elements into a vector.

Value

Returns invisibly an object of the same class as EMM.

See Also

EMM-class,

Examples

data("16S")

## create two EMMs for different data
emm1 <- EMM("Kullback", threshold=0.1, data=Mollicutes16S+1)
emm2 <- EMM("Kullback", threshold=0.1, data=Alphaproteobacteria16S+1)

## combine the two EMMs
emm12 <- c(emm1, emm2)
## this is the same as:
## emm12 <- copy(emm1)
## c(emm12, emm2, copy=FALSE)

## recluster states so similar states in the to EMMs will be merged
emm12r <- recluster_tNN(emm12)

op <- par(mfrow = c(1, 2), pty = "s")
plot(emm12, main="Two EMMs")
plot(emm12r, main="Two EMMs (reclustered)")
par(op)

rEMM documentation built on May 29, 2024, 4:35 a.m.