diff --git a/R/get_dataset_additional_info.R b/R/get_dataset_additional_info.R index 05f6271..406dc00 100644 --- a/R/get_dataset_additional_info.R +++ b/R/get_dataset_additional_info.R @@ -1,3 +1,11 @@ +#' returns a list of dataset names alongwith additional information, +#' such as the amount of resources and the date it was last updated +#' +#' @param dataset_name +#' +#' @return +#' @export +#' get_datasets_additional_info <- function(dataset_name){ query <- paste0("id=", dataset_name) content <- phs_GET("package_show", query) diff --git a/R/list_datasets.R b/R/list_datasets.R index 3ea158c..0afb6cf 100644 --- a/R/list_datasets.R +++ b/R/list_datasets.R @@ -2,11 +2,15 @@ #' #' `list_datasets()` shows all of the datasets hosted on the phs open data platform. #' +#' @param include_additional_info (optional) set to true to return the number +#' of resources per dataset and the date the dataset was last updated +#' #' @return A character vector. #' @export #' #' @examples #' head(list_datasets()) +#' head(list_datasets(include_additional_info = T)) #' list_datasets <- function(include_additional_info = F) { data_sets <- phs_GET("package_list", "")$result