R/extractSingletonNumericDataFromList.R

Defines functions extractSingletonNumericDataFromList

Documented in extractSingletonNumericDataFromList

#' Extract singletion numeric data from a named list to produce a data frame
#' @param lst A list we wish to process
#' @author Alexander Kheirallah ([email protected])
#' @export

extractSingletonNumericDataFromList <- function(lst) {
  out <- matrix(nrow = length(lst), ncol = 2)
  for(i in 1:length(lst)){
    out[i,2] <- lst[[i]]
  }
  out[,1]<- names(lst)
  return(as.data.frame(out))
}
msxakk89/dat documentation built on March 25, 2020, 3:18 p.m.