R/dryad_select_url.R
dryad_list_csv.Rd
Read files stored in dryad or find their download URLs.
dryad_list_csv(doi, regexp = "[.]csv$", invert = FALSE, ignore.case = TRUE) dryad_select_url(dryad_url, regexp = NULL, invert = FALSE, ignore.case = TRUE)
doi | A character string giving a valid dryad doi, such as "'10.5061/dryad.6nc8c'". |
---|---|
regexp | A regular expression (e.g. |
invert | If |
ignore.case | if |
dryad_url | A character string. The output of |
When run interactively, both functions ask you to select files.
dryad_list_csv()
outputs a list with the selected files.
dryad_select_url()
outputs a character string giving the download
URLs of the selected files.
scbi_functional_ecology_2015 <- '10.5061/dryad.6nc8c' # Help find a relevant url dryad_select_url( rdryad::dryad_files(scbi_functional_ecology_2015) )#>#> [1] "http://datadryad.org/bitstream/handle/10255/dryad.86296/SCBI_annual_growth.csv?sequence=1"# Shortcut to download and read multiple .csv files at once dryad_list_csv(scbi_functional_ecology_2015)#>#>#> #> #>#>#> $SCBI_annual_growth.csv #> # A tibble: 50 x 34 #> DBH.min.mm DBH.max.mm all.sp.n.stems all.sp.mean.ann… acru.n.stems #> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 10.1 11.1 156 0.09 1 #> 2 11.1 12.3 506 0.21 1 #> 3 12.3 13.6 807 0.34 2 #> 4 13.6 15 1072 0.5 0 #> 5 15 16.6 1458 0.64 2 #> 6 16.6 18.4 1552 0.84 2 #> 7 18.4 20.3 1487 1.01 1 #> 8 20.3 22.4 1589 1.22 2 #> 9 22.4 24.8 1519 1.36 2 #> 10 24.8 27.4 1327 1.53 2 #> # … with 40 more rows, and 29 more variables: acru.annual.growth <dbl>, #> # caco.n.stems <dbl>, caco.annual.growth <dbl>, cagl.n.stems <dbl>, #> # cagl.annual.growth <dbl>, caovl.n.stems <dbl>, caovl.annual.growth <dbl>, #> # cato.n.stems <dbl>, cato.annual.growth <dbl>, fagr.n.stems <dbl>, #> # fagr.annual.growth <dbl>, fram.n.stems <dbl>, fram.annual.growth <dbl>, #> # juni.n.stems <dbl>, juni.annual.growth <dbl>, litu.n.stems <dbl>, #> # litu.annual.growth <dbl>, nysy.n.stems <dbl>, nysy.annual.growth <dbl>, #> # qual.n.stems <dbl>, qual.annual.growth <dbl>, qupr.n.stems <dbl>, #> # qupr.annual.growth <dbl>, quru.n.stems <dbl>, quru.annual.growth <dbl>, #> # quve.n.stems <dbl>, quve.annual.growth <dbl>, ulru.n.stems <dbl>, #> # ulru.annual.growth <dbl> #>