Adds a layer with circles that can represent data. The main parameters that can be used to represent data are the following:
radius
var_fillColor
var_color (stroke's color)
lm_markers(
data = NULL,
radius = 10,
min = 10,
max = 40,
fillColor = NULL,
var_fillColor = NULL,
fillOpacity = 0.8,
stroke = FALSE,
color = NULL,
var_color = NULL,
weight = 1,
opacity = 0.8,
legend = TRUE,
legendPosition = c("topright", "bottomright", "bottomleft", "topleft"),
legendOrientation = c("vertical", "horizontal"),
legendOpacity = 0.5,
FUN = NULL,
display = c("auto", "requested", "all", "leaves"),
popup = NULL,
label = NULL
)
An lm_markers object containing all aesthetics details for one layer of markers.
A sub dataset to use, if NULL then all of the taxids from the lifemap object given to lifemap() will be used.
Either a numerical value or a column name of the original dataframe to represent this variable by the size of markers.
An integer indicating the minimal size of the markers if radius is a column name.
An integer indicating the maximal size of the markers if radius is a column name.
Either a color or a palette if the fillColor is represented by a variable.
A column name of the original dataframe to represent this variable by the fillColor of markers.
A numeric indicating the fill opacity.
A logical indicating whether to draw a border for markers.
The stroke color. Either a color or a palette if the stroke color is represented by a variable.
A column name of the original dataframe to represent this variable by the stroke color.
The stroke width in pixels.
The stroke opacity.
Whether to display the legend or not.
c("topright", "bottomright", "bottomleft", "topleft").
c("vertical", "horizontal").
Legend opacity (applies on the shapes in the legend, not the background itself).
The function to be applied to infer values. If NULL then the information missing from the parent nodes won't be inferred.
c("auto", "requested", "all", "leaves"), a string indicating how to display markers :
"auto" : the markers are displayed depending on the zoom level, by default, allow to have a lot of markers
"requested" : only displays the requested taxa, but all at the same time
"all" : displays all the taxa including all the ancestors to the root
"leaves" : displays only the latest (most recent) taxa
(WARNING : "requested", "leaves" and "auto" shouldn't be used to display more than 2000 markers as it may result in long computing time).
A column name indicating what to display when clicking on a node.
A column name indicating what to display when hovering on a node.
data(LM_eukaryotes)
lm_markers(data = LM_eukaryotes$df[LM_eukaryotes$df$Group %in% "Plants", ])
lm_markers(radius = "GC.", var_fillColor = "Genes")
Run the code above in your browser using DataLab