neurogenomics / HPOExplorer

Functions for working with the Human Phenotype Ontology data
https://neurogenomics.github.io/HPOExplorer/
4 stars 1 forks source link

save files to `tempdir()` by default #17

Closed bschilder closed 3 years ago

bschilder commented 3 years ago

Whenever you have a default location to store files, it's a good idea to make that default a tempdir(). This is requires by CRAN/Bioc checks, but also helps you avoid accidentally including temp files in your package build.

bschilder commented 3 years ago
load_phenotype_to_genes <- function(pheno_to_genes_txt_file = "data/phenotype_to_genes.txt") {
...

to

load_phenotype_to_genes <- function(pheno_to_genes_txt_file =
                                        file.path(tempdir(),
                                                  "data/phenotype_to_genes.txt")
                                    ) {
...