Remove a layer from a project
Usage
sg_roi_remove_layer(project, name, call = rlang::caller_env())Arguments
- project
An sg_roi_project.
- name
Single string layer name.
- call
The calling environment, for error reporting.
Value
A new sg_roi_project without the named layer. The input is unchanged.
Examples
proj <- sg_roi_project(sg_roi_frame(c(20, 20)),
list(sg_roi_layer("tumour"), sg_roi_layer("stroma")))
names(sg_roi_remove_layer(proj, "stroma")$layers)
#> [1] "tumour"