Skip to contents

Create a layer

Usage

at_layer(
  name,
  labels = character(),
  style = at_style(),
  ...,
  call = rlang::caller_env()
)

Arguments

name

Single string layer name (unique within a project).

labels

Character vector; the controlled label vocabulary for the layer.

style

An annot_style, from at_style().

...

Additional named metadata stored on the layer.

call

The calling environment, for error reporting.

Value

An annot_layer with no ROIs and a resolved colour mapping.

Examples

lyr <- at_layer("tumour", labels = c("tumour", "stroma"))
at_layer_n(lyr)
#> [1] 0