Learn R Programming

rphylopic (version 1.0.0)

pick_phylopic: Pick a PhyloPic image from available options

Description

This function provides a visually interactive way to pick an image and valid uuid for an input taxonomic name. As multiple silhouettes can exist for each species in PhyloPic, this function is useful for choosing the right image/uuid for the user.

Usage

pick_phylopic(name = NULL, n = 5, auto = NULL)

Value

A Picture object is returned. The uuid of the selected image is saved as the "uuid" attribute of the returned object and is also printed to console.

Arguments

name

character. A taxonomic name. Different taxonomic levels are supported (e.g. species, genus, family).

n

numeric. How many uuids should be viewed? Depending on the requested name, multiple silhouettes may exist. If n exceeds the number of available images, all available uuids will be returned. Defaults to 5.

auto

numeric. This argument allows the user to automate input into the menu choice. If the input value is 1, requested images will be automatically cycled through with the final image returned. If the input value is 2, the first returned image will be selected. If NULL (default), the user must interactively respond to the called menu.

Details

This function allows the user to visually select the desired image from a pool of silhouettes available for the input name.

Examples

Run this code
if (FALSE) {
img <- pick_phylopic(name = "Canis lupus", n = 5)
}

Run the code above in your browser using DataLab