R/utils.R

Defines functions as_row_list get_names remove_NULL

#' @importFrom magrittr %>%
#' @export
magrittr::`%>%`

remove_NULL  <-  function(x.list) {
  x.list[unlist(lapply(x.list, length) != 0)]
}

get_names <- function(obj_list) {
  sapply(obj_list, function(obj) obj$name)
}

as_row_list <- function(df) do.call(function(...) Map(list,...), df)

Try the readsdr package in your browser

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

readsdr documentation built on Jan. 13, 2021, 11:08 a.m.