Description Usage Arguments Value Examples
View source: R/hcp_list_files.R
Lists a set of files from an HCP bucket for a specific sub-folder
1 2 3 4 5 6 7 8 9 10 11 | hcp_list_files(prefix = "", delimiter = NULL, query = NULL, ...)
fcp_list_files(prefix = "", delimiter = NULL, query = NULL, ...)
openneuro_list_files(prefix = "", delimiter = NULL, query = NULL, ...)
hcp_list_dirs(prefix = "HCP/", ...)
fcp_list_dirs(prefix = "data/Projects/", ...)
openneuro_list_dirs(prefix = NULL, ...)
|
prefix |
directory folder to list files. If |
delimiter |
Delimiter to list files. For example |
query |
Additional query arguments |
... |
additional arguments passed to |
List with the result of the GET command, the parsed result, and the content from the result.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | if (have_aws_key()){
x = hcp_list_files(prefix = "HCP/100307/unprocessed/3T/Diffusion",
delimiter="bval")
t1_niis = hcp_list_files(prefix ="HCP/100307/T1w",
delimiter = ".nii.gz")
all_dirs = hcp_list_dirs("HCP/")
}
if (have_aws_key()){
all_dirs = hcp_list_dirs("HCP/")
cr =parse_list_files(all_dirs)$prefixes
}
## Not run:
res = fcp_list_dirs()
projects = unlist(parse_list_files(res)$prefixes)
projects = unname(projects)
head(projects)
head(basename(projects))
## End(Not run)
res = openneuro_list_dirs()
projects = unlist(parse_list_files(res)$prefixes)
projects = unname(projects)
head(projects)
if (length(projects) > 0) {
head(basename(projects))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.