https://github.com/cran/robCompositions
Raw File
Tip revision: e0e46e2d22f0b04308b896fd000cd7f493f04383 authored by Matthias Templ on 16 August 2010, 00:00:00 UTC
version 1.4.3
Tip revision: e0e46e2
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)	
}
back to top