remove_views: Remove views from the current view composition

View source: R/view-composers.R

remove_viewsR Documentation

Remove views from the current view composition

Description

Remove one or more views from the view composition.

Usage

remove_views(current.views, view.names)

Arguments

current.views

the current view composition.

view.names

the names of one or more views to be removed.

Details

The intraview and the unique id cannot be removed with this function.

Value

A mistyR view composition with view.names views removed.

See Also

Other view composition functions: add_juxtaview(), add_paraview(), add_views(), create_initial_view(), create_view()

Examples

library(dplyr)

# get the expression data
data("synthetic")
expr <- synthetic[[1]] %>% select(-c(row, col, type))
# get the coordinates for each cell
pos <- synthetic[[1]] %>% select(row, col)

# compose
misty.views <- create_initial_view(expr) %>%
  add_juxtaview(pos, neighbor.thr = 1.5) %>%
  add_paraview(pos, l = 10)

# preview
str(misty.views)

# remove juxtaview and preview
misty.views %>%
  remove_views("juxtaview.1.5") %>%
  str()

# remove juxtaview and paraview and preview
misty.views %>%
  remove_views(c("juxtaview.1.5", "paraview.10")) %>%
  str()

saezlab/mistyR documentation built on March 25, 2024, 4:12 p.m.