setMethodS3("drawLevels", "DNAcopy", function(fit, field=c("seg.mean", "tcn.mean", "dh.mean"), xScale=1, col="red", lwd=3, ...) {
field <- match.arg(field)
segments <- fit$output[,c("loc.start", "loc.end", field)]
apply(segments, MARGIN=1, FUN=function(seg) {
x <- c(seg[["loc.start"]], seg[["loc.end"]])
y <- rep(seg[[field]], times=2)
lines(x=xScale*x, y=y, col=col, lwd=lwd, ...)
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.