R/locfitByCol.R

Defines functions locfitByCol

Documented in locfitByCol

locfitByCol <- function(y, x=NULL, weights=1, span=0.5, degree=0)
#	Gordon Smyth
#	20 Aug 2012.  Last modified 15 June 2016.
{
	y <- as.matrix(y)
	ntags <- nrow(y)
	weights <- rep_len(weights,ntags)
	if(is.null(x)) x <- 1:ntags
	if(span*ntags<2 || ntags<=1) return(y)
	for (j in 1:ncol(y)) y[,j] <- fitted(locfit(y[,j]~x,weights=weights, alpha=span,deg=degree))
	y
}

Try the edgeR package in your browser

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

edgeR documentation built on May 31, 2017, 11:02 a.m.