add_views: Add custom views to the current view composition

View source: R/view-composers.R

add_viewsR Documentation

Add custom views to the current view composition

Description

Add one or more custom views to the current view composition.

Usage

add_views(current.views, new.views)

Arguments

current.views

the current view composition.

new.views

a view or a list of views created with create_view() or otherwise.

Value

A mistyR view composition containing an union of views from current.views and new.views.

See Also

create_initial_view() for starting a view composition, with an intraview, create_view() for creating a custom view.

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

Examples


# create random views
view1 <- data.frame(marker1 = rnorm(100, 10, 2), marker2 = rnorm(100, 15, 3))
view2 <- data.frame(marker1 = rnorm(100, 10, 5), marker2 = rnorm(100, 15, 5))

misty.views <- create_initial_view(view1)

new.view <- create_view("dummyname", view2, "dname")
add_views(misty.views, new.view)

misty.views %>% add_views(create_view("dummyname", view2, "dname"))

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