R/as.all.R

Defines functions as.all

Documented in as.all

as.all = function(x, what) {
  na = is.na(x)
  x  = do.call(paste("as.", what, sep=""), list(x))
  if(any(is.na(x)!=na))
    stop("Non-numeric values were produced in as.all")
  return(x)
}

Try the prada package in your browser

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

prada documentation built on April 28, 2020, 7:52 p.m.