R/plotCtHistogram.R

Defines functions plotCtHistogram

Documented in plotCtHistogram

plotCtHistogram <-
function(q,
	card	= 1,
	xlab	= "Ct",
	col,
	main,
	n	= 30,
	...)
{
	# Get the data
	if (class(q)=="matrix") {
		data <- q[,card]	
		if (missing(main))
			main <- colnames(q)[card]
	} else if (class(q)=="qPCRset") {
		data <- exprs(q)[,card]
		if (missing(main))
			main <- sampleNames(q)[card]
	} else {
		stop("Data is of wrong format, only qPCRset and matrices are supported.\n")
	}
	# Setting some plotting parameters
 if (missing(col))
 	col <- "#66C2A5"
	# Plot histogram
	hist(data, breaks=n, col=col, main=main, xlab=xlab, ...)
	
}

Try the HTqPCR package in your browser

Any scripts or data that you put into this service are public.

HTqPCR documentation built on Nov. 8, 2020, 6:51 p.m.