R/select.eigentraits.R

Defines functions select.eigentraits

Documented in select.eigentraits

select.eigentraits <-
function(data.obj, traits.which = c(1,2)){
	
	ET <- data.obj$ET
	
	if(max(traits.which) > dim(ET)[2]){
		stop("Undefined ET have been specified.")
		}
	if(length(unique(traits.which)) < length(traits.which)){
		stop("There are redundant ET specified.")
		}
	selected.ET <- ET[,traits.which]
	data.obj$ET <- selected.ET
	return(data.obj)
	
}

Try the cape package in your browser

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

cape documentation built on May 2, 2019, 3:27 a.m.