get_silhouettes: Get silhouettes

View source: R/get_silhouettes.R

get_silhouettesR Documentation

Get silhouettes

Description

Get silhouette images of each species from phylopic.

Usage

get_silhouettes(
  species,
  which = rep(1, length(species)),
  run_format_species = TRUE,
  include_image_data = FALSE,
  mc.cores = 1,
  add_png = FALSE,
  remove_bg = FALSE,
  verbose = TRUE
)

Arguments

species

A character vector of species names to query phylopic for.

which

An integer vector of the same length as species. Lets you choose which image you want to use for each species (1st, 2nd 3rd, etc.).

run_format_species

Standardise species names with format_species before querying phylopic (default: TRUE).

include_image_data

Include the image data itself (not just the image UID) in the results.

mc.cores

Accelerate multiple species queries by parallelising across multiple cores.

add_png

Return URLs for both the SVG and PNG versions of the image.

remove_bg

Remove image background.

verbose

Print messages.

Value

data.frame with:

  • input_species : Species name (input).

  • species : Species name (standardised).

  • uid : Species UID.

  • url : Image URL.

Source

Related function: ggimage::geom_phylopic

phylopic/rphylopic API changes

ggimage: Issue with finding valid PNGs

Examples

 
species <- c("Mus_musculus","Pan_troglodytes","Homo_sapiens")
uids <- get_silhouettes(species = species)

neurogenomics/orthogene documentation built on Jan. 30, 2024, 4:44 a.m.