R/s4list.R

#' @title Function \code{s4list}
#' @description Turn an s4 object into a list
#' @export
#' @return a list of slots
#' @param obj an s4 object
s4list = function(obj){
  lst = lapply(slotNames(obj), function(x){slot(obj, x)})
  names(lst) = slotNames(obj)
  lst
}
wlandau/fbseq documentation built on May 4, 2019, 8:43 a.m.