S3 generic to set GDCQuery expand parameter
Examples
gProj = projects()
gProj$fields
#> [1] "dbgap_accession_number" "disease_type" "intended_release_date"
#> [4] "name" "primary_site" "project_autocomplete"
#> [7] "project_id" "releasable" "released"
#> [10] "state"
head(available_fields(gProj))
#> [1] "dbgap_accession_number" "disease_type"
#> [3] "intended_release_date" "name"
#> [5] "primary_site" "program.dbgap_accession_number"
default_fields(gProj)
#> [1] "dbgap_accession_number" "disease_type" "intended_release_date"
#> [4] "name" "primary_site" "project_autocomplete"
#> [7] "project_id" "releasable" "released"
#> [10] "state"
gProj %>%
select(default_fields(gProj)[1:2]) %>%
response() %>%
str(max_level=2)
#> List of 4
#> $ results :'data.frame': 10 obs. of 4 variables:
#> ..$ id : chr [1:10] "TARGET-NBL" "GENIE-GRCC" "GENIE-DFCI" "GENIE-NKI" ...
#> ..$ dbgap_accession_number: chr [1:10] "phs000467" NA NA NA ...
#> ..$ project_id : chr [1:10] "TARGET-NBL" "GENIE-GRCC" "GENIE-DFCI" "GENIE-NKI" ...
#> ..$ disease_type :List of 10
#> .. ..$ TARGET-NBL: chr [1:2] "Neuroepitheliomatous Neoplasms" "Not Applicable"
#> .. ..$ GENIE-GRCC: chr [1:32] "Osseous and Chondromatous Neoplasms" "Synovial-like Neoplasms" "Fibromatous Neoplasms" "Myomatous Neoplasms" ...
#> .. ..$ GENIE-DFCI: chr [1:52] "Osseous and Chondromatous Neoplasms" "Other Leukemias" "Synovial-like Neoplasms" "Lymphoid Leukemias" ...
#> .. ..$ GENIE-NKI : chr [1:23] "Synovial-like Neoplasms" "Fibromatous Neoplasms" "Myomatous Neoplasms" "Transitional Cell Papillomas and Carcinomas" ...
#> .. ..$ GENIE-VICC: chr [1:43] "Neoplasms, NOS" "Adnexal and Skin Appendage Neoplasms" "Squamous Cell Neoplasms" "Gliomas" ...
#> .. ..$ GENIE-UHN : chr [1:39] "Other Leukemias" "Osseous and Chondromatous Neoplasms" "Synovial-like Neoplasms" "Lymphoid Leukemias" ...
#> .. ..$ GENIE-MDA : chr [1:34] "Osseous and Chondromatous Neoplasms" "Synovial-like Neoplasms" "Fibromatous Neoplasms" "Myomatous Neoplasms" ...
#> .. ..$ GENIE-MSK : chr [1:49] "Osseous and Chondromatous Neoplasms" "Synovial-like Neoplasms" "Lymphoid Leukemias" "Fibromatous Neoplasms" ...
#> .. ..$ GENIE-JHU : chr [1:33] "Osseous and Chondromatous Neoplasms" "Other Leukemias" "Synovial-like Neoplasms" "Lymphoid Leukemias" ...
#> .. ..$ FM-AD : chr [1:23] "Gliomas" "Acinar Cell Neoplasms" "Specialized Gonadal Neoplasms" "Miscellaneous Tumors" ...
#> $ query :List of 5
#> ..$ fields : chr [1:3] "project_id" "dbgap_accession_number" "disease_type"
#> ..$ filters: NULL
#> ..$ facets : NULL
#> ..$ legacy : logi FALSE
#> ..$ expand : NULL
#> ..- attr(*, "class")= chr [1:3] "gdc_projects" "GDCQuery" "list"
#> $ pages :List of 7
#> ..$ count: int 10
#> ..$ total: int 72
#> ..$ size : int 10
#> ..$ from : int 0
#> ..$ sort : chr ""
#> ..$ page : int 1
#> ..$ pages: int 8
#> $ aggregations: list()
#> - attr(*, "class")= chr [1:3] "GDCprojectsResponse" "GDCResponse" "list"