lm_branches {LifemapR}R Documentation

Add a "branches" layer to a lifemap_obj object.

Description

Add a "branches" layer to a lifemap_obj object.

Usage

lm_branches(
  data = NULL,
  color = NULL,
  var_color = NULL,
  size = 5,
  min = 2,
  max = 20,
  opacity = 0.5,
  FUN = NULL,
  legend = TRUE,
  legendPosition = c("topright", "bottomright", "bottomleft", "topleft")
)

Arguments

data

A sub dataset to use, if NULL then all of the taxids from the lifemap object given to lifemap() will be used.

color

Either a color for the branches or a palette if a variable is used to represent branches' color.

var_color

A column name of the original dataframe to represent this variable by the color of branches.

size

Either a numeric for the branche's thickness or a variable to be represented by the branche's thickness.

min

An integer indicating the minimal thickness of the branches if the size is a column name.

max

An integer indicating the maximal thickness of the branches if the size is a column name.

opacity

An integer indicating branche's opacity.

FUN

The function to be applied to infer values. If NULL values won't be inferred

legend

A logical indicating whether or not to display the legend.

legendPosition

c("topright", "bottomright", "bottomleft", "topleft"), the position of the legend.

Value

An lm_branches object containing all aesthetics details for one layer of branches

Examples

data(LM_eukaryotes)

lm_branches(var_color = "GC.", color = "Accent")

lm_branches(data = LM_eukaryotes$df[LM_eukaryotes$df$Group %in% "Plants",])


[Package LifemapR version 1.1.1 Index]