lm_markers | R Documentation |
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
)
data |
A sub dataset to use, if NULL then all of the taxids from the lifemap object given to lifemap() will be used. |
radius |
Either a numerical value or a column name of the original dataframe to represent this variable by the size of markers. |
min |
An integer indicating the minimal size of the markers if radius is a column name. |
max |
An integer indicating the maximal size of the markers if radius is a column name. |
fillColor |
Either a color or a palette if the fillColor is represented by a variable. |
var_fillColor |
A column name of the original dataframe to represent this variable by the fillColor of markers. |
fillOpacity |
A numeric indicating the fill opacity. |
stroke |
A logical indicating whether to draw a border for markers. |
color |
The stroke color. Either a color or a palette if the stroke color is represented by a variable. |
var_color |
A column name of the original dataframe to represent this variable by the stroke color. |
weight |
The stroke width in pixels. |
opacity |
The stroke opacity. |
legend |
Whether to display the legend or not. |
legendPosition |
c("topright", "bottomright", "bottomleft", "topleft"). |
legendOrientation |
c("vertical", "horizontal"). |
legendOpacity |
Legend opacity (applies on the shapes in the legend, not the background itself). |
FUN |
The function to be applied to infer values. If NULL then the information missing from the parent nodes won't be inferred. |
display |
c("auto", "requested", "all", "leaves"), a string indicating how to display markers :
(WARNING : "requested", "leaves" and "auto" shouldn't be used to display more than 2000 markers as it may result in long computing time). |
popup |
A column name indicating what to display when clicking on a node. |
label |
A column name indicating what to display when hovering on a node. |
An lm_markers object containing all aesthetics details for one layer of markers.
data(LM_eukaryotes)
lm_markers(data = LM_eukaryotes$df[LM_eukaryotes$df$Group %in% "Plants", ])
lm_markers(radius = "GC.", var_fillColor = "Genes")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.