seandavi / GEOquery

The bridge between the NCBI Gene Expression Omnibus and Bioconductor
http://seandavi.github.io/GEOquery/
Other
87 stars 36 forks source link

Move to `fs::path` rather than `file.path` #131

Open dereckmezquita opened 2 years ago

dereckmezquita commented 2 years ago

Unfortunately base R's functions have some imperfections; use fs instead. I was reading getGEOSuppFiles and found use of file.path across the whole package.

url <- "https://ftp.ncbi.nlm.nih.gov/geo/series/GSE48nnn/GSE48350/suppl/"
i <- "GSE48350_RAW.tar"

file.path(url, i)
"https://ftp.ncbi.nlm.nih.gov/geo/series/GSE48nnn/GSE48350/suppl//GSE48350_RAW.tar"

Note the double forward slash in above result: //.

fs::path(url, i)
https:/ftp.ncbi.nlm.nih.gov/geo/series/GSE48nnn/GSE48350/suppl/GSE48350_RAW.tar