Guest User

Untitled

a guest
Feb 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. lowessNormalization <- function(x, y, include = TRUE, line = NULL,
  2. ...) {
  3. isFinite <- (is.finite(x) & is.finite(y))
  4. if (any(isFinite)){
  5. if (is.null(line)) {
  6. line <- lowess(x[isFinite & include], y[isFinite &
  7. include], ...)
  8. }
  9. y[isFinite] <- y[isFinite] - approx(line, xout = x[isFinite],
  10. ties = mean)$y
  11. }
  12.  
  13. y
  14. }
Add Comment
Please, Sign In to add comment