https://github.com/cran/robCompositions
Tip revision: e11c86d2552011aab02cc433769f449e3fd7ce93 authored by Matthias Templ on 06 April 2010, 14:00:48 UTC
version 1.4.0
version 1.4.0
Tip revision: e11c86d
invclr.R
invclr <- function(x, useClassInfo=TRUE){
if(class(x) != "clr" & useClassInfo == TRUE) warning("useClassInfo was set to FALSE, because x is not from class clr")
if(!(class(x) %in% c("clr", "data.frame", "matrix"))) stop("class from x must be either clr, data.frame or matrix")
xclr <- x$x.clr
if(class(x) == "clr" & useClassInfo==TRUE){
dat <- exp(xclr) * x$gm
} else if(class(x) != "clr" | useClassInfo==FALSE){
dat <- exp(x)
}
invisible(dat)
}