| Title: | Example Data from the Multi-Modal MRI 'Reproducibility' Resource |
|---|---|
| Description: | Multi-modal magnetic resonance imaging ('MRI') data from the 'Kirby21' 'reproducibility' study <https://www.nitrc.org/projects/multimodal/>, including functional and structural imaging. |
| Authors: | John Muschelli <[email protected]> |
| Maintainer: | John Muschelli <[email protected]> |
| License: | GPL-2 |
| Version: | 1.7.3 |
| Built: | 2026-05-20 08:12:18 UTC |
| Source: | https://github.com/muschellij2/kirby21.base |
Return the modalities for images where packages were developed
all_modalities()all_modalities()
Vector of characters
Copies files from Kirby21 Package to an output directory
copy_kirby21_data(copydir, ...)copy_kirby21_data(copydir, ...)
copydir |
Output directory for data |
... |
Arguments to pass to |
Logical if files are copied
on_cran = !identical(Sys.getenv("NOT_CRAN"), "true") on_ci <- nzchar(Sys.getenv("CI")) local_run = grepl("musch", tolower(Sys.info()[["user"]])) run_example = !on_cran || on_ci || local_run if (run_example) { tdir = tempfile() dir.create(tdir) outdir = tempdir() surv_installed = "kirby21.survey" %in% installed.packages() if (!surv_installed) { testthat::expect_error( download_kirby21_data("SURVEY", force = FALSE)) } else { download_kirby21_data("SURVEY", force = FALSE) } res = download_kirby21_data("SURVEY", outdir = outdir, force = TRUE) if (!surv_installed) { try({remove.packages("kirby21.survey")}) } copy_kirby21_data(copydir = tdir, outdir = outdir) }on_cran = !identical(Sys.getenv("NOT_CRAN"), "true") on_ci <- nzchar(Sys.getenv("CI")) local_run = grepl("musch", tolower(Sys.info()[["user"]])) run_example = !on_cran || on_ci || local_run if (run_example) { tdir = tempfile() dir.create(tdir) outdir = tempdir() surv_installed = "kirby21.survey" %in% installed.packages() if (!surv_installed) { testthat::expect_error( download_kirby21_data("SURVEY", force = FALSE)) } else { download_kirby21_data("SURVEY", force = FALSE) } res = download_kirby21_data("SURVEY", outdir = outdir, force = TRUE) if (!surv_installed) { try({remove.packages("kirby21.survey")}) } copy_kirby21_data(copydir = tdir, outdir = outdir) }
This function allows users to remove specific modalities for Kirby21 data sets. This allows this package to be on CRAN
delete_kirby21_data(modality = kirby21.base::all_modalities(), outdir = NULL)delete_kirby21_data(modality = kirby21.base::all_modalities(), outdir = NULL)
modality |
modality of images that are to be downloaded. You must have the package downloaded for that modality. |
outdir |
output directory for files to download. It will default to the directory of the corresponding package for the data. |
Nothing is returned
on_cran = !identical(Sys.getenv("NOT_CRAN"), "true") on_ci <- nzchar(Sys.getenv("CI")) local_run = grepl("musch", tolower(Sys.info()[["user"]])) run_example = !on_cran || on_ci || local_run if (run_example) { outdir = tempdir() res = download_kirby21_data("SURVEY", outdir = outdir, force = TRUE) delete_kirby21_data("SURVEY", outdir = outdir) }on_cran = !identical(Sys.getenv("NOT_CRAN"), "true") on_ci <- nzchar(Sys.getenv("CI")) local_run = grepl("musch", tolower(Sys.info()[["user"]])) run_example = !on_cran || on_ci || local_run if (run_example) { outdir = tempdir() res = download_kirby21_data("SURVEY", outdir = outdir, force = TRUE) delete_kirby21_data("SURVEY", outdir = outdir) }
This function allows users to download specific modalities for Kirby21 data sets. This allows this package to be on CRAN
download_kirby21_data( modality = kirby21.base::all_modalities(), progress = TRUE, force = FALSE, outdir = NULL )download_kirby21_data( modality = kirby21.base::all_modalities(), progress = TRUE, force = FALSE, outdir = NULL )
modality |
modality of images that are to be downloaded. You must have the package downloaded for that modality. |
progress |
Should verbose messages be printed when downloading the data |
force |
If the package of that modality is not installed stop. If
|
outdir |
output directory for files to download. It will default to the directory of the corresponding package for the data. |
A logical indicating the data is there.
on_cran = !identical(Sys.getenv("NOT_CRAN"), "true") on_ci <- nzchar(Sys.getenv("CI")) local_run = grepl("musch", tolower(Sys.info()[["user"]])) run_example = !on_cran || on_ci || local_run if (run_example) { outdir = tempdir() res = download_kirby21_data("SURVEY", outdir = outdir) }on_cran = !identical(Sys.getenv("NOT_CRAN"), "true") on_ci <- nzchar(Sys.getenv("CI")) local_run = grepl("musch", tolower(Sys.info()[["user"]])) run_example = !on_cran || on_ci || local_run if (run_example) { outdir = tempdir() res = download_kirby21_data("SURVEY", outdir = outdir) }
Return the IDs for the people scanned available in the kirby21 packages
get_ids()get_ids()
Vector of numeric ids
Return the filenames for the images
get_image_filenames(...)get_image_filenames(...)
... |
arguments passed to |
get_image_filenames()get_image_filenames()
Return a data.frame of filenames for the images
get_image_filenames_df( ids = get_ids(), modalities = all_modalities(), visits = c(1, 2), long = TRUE, warn = TRUE, outdir = NULL ) get_image_filenames_matrix(...) get_image_filenames_list(...) get_image_filenames_list_by_visit(...) get_image_filenames_list_by_subject(...)get_image_filenames_df( ids = get_ids(), modalities = all_modalities(), visits = c(1, 2), long = TRUE, warn = TRUE, outdir = NULL ) get_image_filenames_matrix(...) get_image_filenames_list(...) get_image_filenames_list_by_visit(...) get_image_filenames_list_by_subject(...)
ids |
ID to return |
modalities |
vector of image modalities within
|
visits |
Vector of scan indices to return (1 or 2 or both) |
long |
if |
warn |
if |
outdir |
output directory for files to download. It will default to the directory of the corresponding package for the data. |
... |
arguments passed to |
Data.frame of filenames
get_image_filenames_df() get_image_filenames_matrix() get_image_filenames_list() get_image_filenames_list_by_visit() get_image_filenames_list_by_subject()get_image_filenames_df() get_image_filenames_matrix() get_image_filenames_list() get_image_filenames_list_by_visit() get_image_filenames_list_by_subject()
Return the filenames for the par files
get_par_filenames( ids = get_ids(), modalities = c("FLAIR", "MPRAGE", "T2w", "fMRI", "DTI"), visits = c(1, 2) )get_par_filenames( ids = get_ids(), modalities = c("FLAIR", "MPRAGE", "T2w", "fMRI", "DTI"), visits = c(1, 2) )
ids |
ID to return |
modalities |
vector of image modalities within
|
visits |
Vector of scan indices to return (1 or 2 or both) |
Data.frame of filenames
get_par_filenames()get_par_filenames()
A dataset containing demographic information for kirby21 data sets
A data frame with 21 rows and 3 columns.
https://www.nitrc.org/frs/?group_id=313
Return the modalities for images and the packages that contain them
modality_df()modality_df()
data.frame of two columns:
modality: modality of image
package: package that contains it
A dataset containing the mapping from the Subject IDs from the Kirby demographics to the KKI2009 identifiers on NITRC
A data frame with 42 rows and 4 columns
https://www.nitrc.org/frs/?group_id=313