Learn R Programming

cardidates (version 0.4.9)

merge.cardiMetacdw: 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 cardiMetacdw
merge(x, y, ...)

Value

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

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.

See Also

metaCDW

Examples

Run this code
## 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)

Run the code above in your browser using DataLab