R/list_datasets.R

Defines functions list_datasets

Documented in list_datasets

#' Lists all available datasets
#'
#' `list_datasets()` shows all of the datasets hosted on the phs open data platform.
#'
#' @return A tibble.
#' @export
#'
#' @examples
#' head(list_datasets())
list_datasets <- function() {
  # fetch the data
  content <- phs_GET("package_list", "")

  data_sets <- tibble::tibble("name" = unlist(content$result))


  return(data_sets)
}

Try the phsopendata package in your browser

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

phsopendata documentation built on Sept. 1, 2025, 5:10 p.m.