R/model_versions.R

Defines functions ps_model_versions

Documented in ps_model_versions

#' List Model Versions
#'
#' @return tibble of model versions
#' @export
#'
#' @concept info
#'
#' @examples
#' ps_model_versions()
ps_model_versions <- function() {
  httr2::request('https://api.planscore.org/model_versions') |>
    httr2::req_perform() |>
    httr2::resp_body_json() |>
    lapply(function(y) dplyr::bind_cols(y, .name_repair = ~ c('id', 'description'))) |>
    dplyr::bind_rows()
}

Try the planscorer package in your browser

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

planscorer documentation built on Sept. 24, 2024, 5:08 p.m.