https://github.com/cran/robCompositions
Raw File
Tip revision: 823295fe4c382069229ac77435da6e5bb14155b9 authored by Matthias Templ on 11 January 2013, 16:29:55 UTC
version 1.6.2
Tip revision: 823295f
invclr.R
invclr <- function(x, useClassInfo=TRUE){
	
	.Deprecated("cenLRinv")
	
	
	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