R/invnormal.R

Defines functions invnormal

Documented in invnormal

#' Inverse normal transformation
#'
#' @param x Data with missing values.
#' @export
#' @return
#' Transformed value.
#' @examples
#' x <- 1:10
#' z <- invnormal(x)
#' plot(z,x,type="b")

invnormal <- function(x)
  qnorm((rank(x,na.last="keep")-0.5)/sum(!is.na(x))) 

Try the gap package in your browser

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

gap documentation built on Aug. 26, 2023, 5:07 p.m.