get_attribution {rphylopic} | R 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, permalink = FALSE)
Arguments
uuid |
|
img |
A Picture or png array object from
|
text |
|
permalink |
|
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 printed and image attribution data is returned
invisibly (i.e. using invisible()
. If permalink
is set to TRUE
, a
permanent link (hosted by PhyloPic) will be
generated. This link can be used to view and share details about the
image silhouettes, including contributors and licenses.
Value
A list
of PhyloPic attribution data for an image uuid
or
a text output of relevant attribution information.
Examples
## Not run:
# Get valid uuid
uuid <- get_uuid(name = "Acropora cervicornis")
# Get attribution data for uuid
attri <- get_attribution(uuid = uuid)
# Get list of valid uuids
uuids <- get_uuid(name = "Scleractinia", n = 5)
# Get attribution data for uuids
get_attribution(uuid = uuids, text = TRUE)
# Get attribution data for uuids and create permalink
get_attribution(uuid = uuids, text = TRUE, permalink = TRUE)
## End(Not run)