R/profiles_matrix.R

Defines functions profiles_matrix

Documented in profiles_matrix

profiles_matrix <- function(x){
	if (is.null(x)) return(NULL)
	sm <-  list.as.matrix(x$stacks$nodes)


	filledprofile <- matrix(NA, nrow=nrow(sm), ncol=length(x$profiles$data))

	for (iprof in (1:ncol(filledprofile))) 
		filledprofile[,iprof] <- sm[,x$profiles$data[iprof]]
	filledprofile
}# profiles_matrix

Try the sprof package in your browser

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

sprof documentation built on May 2, 2019, 4:45 p.m.