View source: R/HPA_data_downloader.R
HPA_data_downloader | R Documentation |
Used to download required data for HPAStainR
HPA_data_downloader( tissue_type = c("both", "normal", "cancer"), save_file = TRUE, save_location = "", version_date_normal = "last", version_date_cancer = "last", force_download = FALSE )
tissue_type |
A character string that determines which HPA data you want to download from the website. Has to be both' (default), 'normal', or 'cancer'. |
save_file |
A boolean determining if you want the HPA data downloaded permanently or temporarily. Default is TRUE, meaning the file will be saved in the given 'save_location', default being the current working directory. |
save_location |
A character string indicating where you want the files to be saved if you are saving them. If the file(s) already exists in that location, those will be loaded instead of redownloading the files. |
version_date_normal |
a character string indicating what date of the normal tissue file you want returned if you have saved one. If you say "last" it will return the most recently downloaded file, otherwise give a date in YYYY-MM-DD format. |
version_date_cancer |
a character string indicating what date of the cancer tissue file you want returned if you have saved one. If you say "last" it will return the most recently downloaded file, otherwise give a date in YYYY-MM-DD format. |
force_download |
Either a TRUE or FALSE indicating that the HPA files should be re-downloaded from the website, regardless of there being a local recent version. This should be done occasionally to make sure you have up to date data. |
List of dataframes or dataframe depending on tissue_type arguement. If tissue_type == 'both' it will be a list of dataframes.
HPA_data <- HPA_data_downloader(tissue_type = 'both', save_file = FALSE) ## Access normal data HPA_data$hpa_dat ## Access cancer data HPA_data$cancer_dat ## Download only the normal tissue data HPA_normal_data <- HPA_data_downloader('normal', save_file = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.