ropensci / rfishbase

R interface to the fishbase.org database
https://docs.ropensci.org/rfishbase
111 stars 40 forks source link

Provide image download function #11

Closed cboettig closed 11 years ago

cboettig commented 11 years ago

Image paths are included in the summary XML along with basic dublin core metadata. Should be easy to extract.

cboettig commented 11 years ago

Okay, implemented as getPictures:

Install the development copy from Github:

library(devtools)
install_github("rfishbase", "ropensci")

Then this should work.

data(fishbase)
sex_swap <- which_fish("change sex", using="lifecycle", fish.data)
africa <- which_fish("Africa", using="distribution", fish.data)
names <- fish_names(fish.data[africa & sex_swap])

getPictures(names[[1]], download=TRUE)
yakir12 commented 11 years ago

This works like a charm.

amroco commented 8 years ago

Hi there, having a bit of trouble with this function:

valid_name <- validate_names(c("Fodiator acutus")) Warning: FishBase says that 'Fodiator acutus' can also be misapplied to other species but is returning only the best match.
See synonyms('Fodiator acutus') for details valid_name [1] "Fodiator acutus" getPictures(valid_name[[1]], download=TRUE) Error: could not find function "getPictures"

Any thoughts? Thanks