R/concatProfiles.R

Defines functions concatProfiles

concatProfiles = function(p){
  if(is(p, "relSimDB")){
    result = as.vector(t(as.matrix(p$profiles)))
  }else if(is(p, "list") && is(p[[1]][[1]], "profile")){
    if(length(p) == 1){
      result = as.vector(t(do.call(rbind, p)))
    }else{
      result = as.vector(t(do.call(rbind, lapply(p, function(prof)do.call(rbind, prof)))))
    }
  }
  
  return(result)
}

Try the relSim package in your browser

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

relSim documentation built on Aug. 29, 2023, 9:07 a.m.