Export the list object generated by hpaSubset() into xlsx format. Due
to the size of some HPA datasets, as well as the limitation of the output
format, exporting the full datasets generated by hpaDownload() is not
recommended. This is a convenient wrapper for `write.` functions.
Arguments
- data
Input the list object generated by
hpaSubset()- fileName
A string indicate the desired output file name. Do not include file extension such as
'.xlsx'.- fileType
The format as which the data will be exported. Choose one of these options:
'xlsx','csv'and'tsv'.
Value
'xlsx': return one .xlsx file named'fileName.xlsx'. One individual sheet for each dataset in the input list object.'csv': return .csv files, one for each dataset in the input list object, named'fileName_datasetName.csv''tsv': return .tsv files, one for each dataset in the input list object, named'fileName_datasetName.tsv'
See also
Other downloadable datasets functions:
hpaDownload(),
hpaSubset()
Examples
downloadedData <- hpaDownload(downloadList='histology', version='example')
#> Only the followings are example/built-in datasets:
#> - Normal tissue
#> - Pathology
#> - Subcellular location
#> Other datasets will not be loaded
geneList <- c('TP53', 'EGFR')
tissueList <- c('breast', 'cerebellum', 'skin 1')
cancerList <- c('breast cancer', 'glioma', 'melanoma')
subsetData <- hpaSubset(data=downloadedData,
targetGene=geneList,
targetTissue=tissueList,
targetCancer=cancerList)
hpaExport(data=subsetData,
fileName='TP53_EGFR_in_tissue_cancer.xlsx',
fileType='xlsx')