plotData: Plot data on the phylogeny

plotDataR Documentation

Plot data on the phylogeny

Description

Plot variables as barplots for each tip of the phylogeny with data available. Several variables can be plotted at the same time.

Usage

plotData(
  variables = NULL,
  dataset = NULL,
  phylogeny = NULL,
  terminal.taxon = "species",
  color_by = NULL,
  name_by = NULL,
  panel_space = 4,
  fontsize_factor = 0.1
)

Arguments

variables

(character). Names of the variable or variables to be ploted as they appear in data.

dataset

(data frame). Data containing the variable of interest and a column naming the terminal taxa as it appears in the phylogeny (e.g., species names).

phylogeny

(phylo). Phylogeny with tip labels contained in data.

color_by

(character). Name of the variable to colour the tree by, if desired.

name_by

(character). Name of the taxonomic variable to display in the phylogeny panel.

panel_space

(numeric). Size of each one of the panels (one for the phylogeny and one per variable included in the "variables" argument).

fontsize_factor

(numeric). Font size multiplier. It modifies the size of the font.

Examples

## Not run: 
# Simulate example data
simulated_traits.data <- simulateDataSet()

# Plot G1_trait1 data on simulated phylogeny

plotData(variables = "phylo_G1_trait1",
dataset = simulated_traits.data$data,
phylogeny = simulatedTraits.data$phylogeny,,
terminal.taxon = "species"
)

## End(Not run)

pablosanchezmart/TrEvol documentation built on April 23, 2024, 4:05 p.m.