get_attribution: Get PhyloPic attribution data

View source: R/get_attribution.R

get_attributionR Documentation

Get PhyloPic attribution data

Description

This function provides a convenient way to obtain attribution data for PhyloPic images via an image uuid returned by get_uuid().

Usage

get_attribution(uuid = NULL, img = NULL, text = FALSE)

Arguments

uuid

character. A vector of valid uuid(s) for PhyloPic silhouette(s) such as that returned by get_uuid() or pick_phylopic().

img

A Picture or png array object from get_phylopic(). A list of these objects can also be supplied. If img is supplied, uuid is ignored. Defaults to NULL.

text

logical. Should attribution information be returned as a text paragraph? Defaults to FALSE.

Details

This function returns image uuid specific attribution data, including: contributor name, contributor uuid, contributor contact, image uuid, license, and license abbreviation. If text is set to TRUE, a text paragraph with the contributor name, year of contribution, and license type is returned.

Value

A list of PhyloPic attribution data for an image uuid or a text output of relevant attribution information.

Examples

# Get valid uuid
uuid <- get_uuid(name = "Acropora cervicornis")
# Get attribution data for uuid
attri <- get_attribution(uuid = uuid)
## Not run: 
# Get list of valid uuids
uuids <- get_uuid(name = "Scleractinia", n = 5)
# Get attribution data for uuids
get_attribution(uuid = uuids, text = TRUE)

## End(Not run)

rphylopic documentation built on Nov. 2, 2023, 6:13 p.m.