merge.cardiMetacdw: Merge Two Objects of Class 'cardiMetacdw'

View source: R/merge.cardiMetacdw.R

merge.cardiMetacdwR Documentation

Merge Two Objects of Class 'cardiMetacdw'

Description

This is a helper function that can be used to replace or add manually fitted cardidates objects to a set of cardidates objects fitted by metaCDW.

Usage

## S3 method for class 'cardiMetacdw'
merge(x, y, ...)

Arguments

x

the result of a call to metaCDW,

y

a second object resulting from a call to metaCDW, but which contains one sample only.

...

not implemented, reserved for future extensions.

Details

This is a helper function that can be used to add additional fits to an existing object or to replace single fits of a metaCSW object. Though the function is intended for fine-tuning of problematic samples it should not be abused for invalidating the general principles of objectivity and reproducibility.

Value

An object of class 'cardiMetacdw', i.e. a Weibull fit.

See Also

metaCDW

Examples

## artificial test data
data(carditest)

## identify all first peaks
fit <- metaCDW(carditest)

## plot it
plot(fit, carditest)

## detect second peak for 'Year2'
sample2 <- subset(carditest, sample == "Year 2")
sample2$sample <- factor(sample2$sample) # drop unused levels
fit2 <- metaCDW(sample2, xstart=150)

## merge results
merged.fit <- merge(fit, fit2)
plot(merged.fit, carditest)

cardidates documentation built on Oct. 8, 2023, 1:06 a.m.