Revision 4f2efb4ed8831a90968ef063d2403d675c84dae3 authored by Matthias Templ on 26 November 2013, 12:55:44 UTC, committed by cran-robot on 26 November 2013, 12:55:44 UTC
1 parent 2ad963b
Raw File
cenLRinv.R
cenLRinv <- 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)  		
	}
	return(dat)	
}
back to top