Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit c73e252

Browse files
committed
r cmd check updates, fix example
1 parent add1ba4 commit c73e252

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-21
lines changed

R/query.R

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -450,28 +450,33 @@ get_metadata <- function(
450450
}
451451

452452
#' Returns unharmonised metadata for selected datasets.
453-
#'
454-
#' Various metadata fields are *not* common between datasets, so it does not make
455-
#' sense for these to live in the main metadata table. This function is a
453+
#'
454+
#' Various metadata fields are *not* common between datasets, so it does not
455+
#' make sense for these to live in the main metadata table. This function is a
456456
#' utility that allows easy fetching of this data if necessary.
457457
#'
458458
#' @param dataset_ids A character vector, where each entry is a dataset ID
459-
#' obtained from the `$dataset_id` column of the table returned from
460-
#' [get_metadata()]
459+
#' obtained from the `$dataset_id` column of the table returned from
460+
#' [get_metadata()]
461+
#' @param remote_url Optional character vector of length 1. An HTTP URL pointing
462+
#' to the root URL under which all the unharmonised dataset files are located.
463+
#' @param cache_directory Optional character vector of length 1. A file path on
464+
#' your local system to a directory (not a file) that will be used to store
465+
#' the unharmonised metadata files.
461466
#' @importFrom purrr map set_names
462467
#' @importFrom glue glue
463468
#' @importFrom DBI dbConnect
464469
#' @importFrom duckdb duckdb
465470
#' @importFrom dplyr tbl
466-
#' @return A named list, where each name is a dataset ID, and each value is
467-
#' a "lazy data frame", ie a `tbl`.
471+
#' @return A named list, where each name is a dataset ID, and each value is a
472+
#' "lazy data frame", ie a `tbl`.
468473
#' @export
469474
#' @examples
470-
#' dataset_id = "838ea006-2369-4e2c-b426-b2a744a2b02b"
471-
#' harmonised_meta = get_metadata() |> dplyr::filter(dataset_id = dataset_id)
472-
#' unharmonised_meta = get_unharmonised_metadata(dataset_id)
473-
#' unharmonised_tbl = unharmonised_meta[[dataset_id]]
474-
#' dplyr::join(harmonised_meta, unharmonised_tbl, by=c("dataset_id", "cell_"))
475+
#' dataset = "838ea006-2369-4e2c-b426-b2a744a2b02b"
476+
#' harmonised_meta = get_metadata() |> dplyr::filter(file_id == dataset) |> dplyr::collect()
477+
#' unharmonised_meta = get_unharmonised_metadata(dataset)
478+
#' unharmonised_tbl = dplyr::collect(unharmonised_meta[[dataset]])
479+
#' dplyr::left_join(harmonised_meta, unharmonised_tbl, by=c("file_id", "cell_"))
475480
get_unharmonised_metadata = function(
476481
dataset_ids,
477482
remote_url = "https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/unharmonised_metadata",

man/get_unharmonised_metadata.Rd

Lines changed: 16 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)