R/list_to_matrix.R

Defines functions list_to_matrix

Documented in list_to_matrix

list_to_matrix<-function(x,item=NA){
  maxlength<-max(sapply(x,length))
  return(t(sapply(x,function(row,maxlength) c(row,rep(item,maxlength-length(row))),maxlength)))
}

Try the forestSAS package in your browser

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

forestSAS documentation built on May 1, 2019, 10:15 p.m.