Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This function takes A and M-values (or any X and Y )
- lowessNormalization <- function(x, y, include = TRUE, line = NULL,
- ...) {
- isFinite <- (is.finite(x) & is.finite(y))
- if (any(isFinite)){
- if (is.null(line)) {
- line <- lowess(x[isFinite & include], y[isFinite &
- include], ...)
- }
- y[isFinite] <- y[isFinite] - approx(line, xout = x[isFinite],
- ties = mean)$y
- }
- y
- }
Add Comment
Please, Sign In to add comment