loon (version 1.3.3)

l_layer_getLabel: Get layer label.

Description

Layer labels are useful to identify layer in the layer inspector. The layer label can be initially set at layer creation with the label argument.

Usage

l_layer_getLabel(widget, layer)

Arguments

widget

widget path or layer object of class 'l_layer'

layer

layer id. If the widget argument is of class 'l_layer' then the layer argument is not used

Value

Named vector of length 1 with layer label as value and layer id as name.

Details

Note that the layer label is not a state of the layer itself, instead is information that is part of the layer collection (i.e. its parent widget).

See Also

l_layer, l_layer_relabel

Examples

Run this code
# NOT RUN {
if(interactive()){

p <- l_plot()
l1 <- l_layer_rectangle(p, x=0:1, y=0:1, label="a rectangle")
l_layer_getLabel(p, 'model')
l_layer_getLabel(p, l1)

}
# }

Run the code above in your browser using DataLab