R/python-helpers.R

Defines functions dict_to_list

## Convert dict of annotations (returned by syn$getAnnotations()) into a named
## list
dict_to_list <- function(x) {
  ## Not sure why x$values() doesn't work here, but it doesn't so we're
  ## iterating to get the values instead :-/
  values <- purrr::map(names(x), function(y) x$get(y))
  stats::setNames(values, names(x))
}

Try the dccvalidator package in your browser

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

dccvalidator documentation built on July 2, 2020, 4:05 a.m.