A jaspObject that can contain other jaspObjects

createJaspContainer(
  title = "",
  dependencies = NULL,
  position = NULL,
  initCollapsed = FALSE
)

Arguments

title

String, title of the jaspContainer

dependencies

see jaspObject

position

see jaspObject

initCollapsed

Logical, should the container be collapsed by default?

Super classes

jaspResults::jaspObjR -> jaspResults::jaspOutputObjR -> jaspContainerR

Active bindings

initCollapsed

is the container collapsed?

Methods

Public methods

Inherited methods

Method new()

Create a new jaspContainer object, however, createJaspContainer is preferred.

Usage

jaspContainerR$new(
  title = "",
  dependencies = NULL,
  position = NULL,
  info = NULL,
  initCollapsed = FALSE,
  jaspObject = NULL
)

Arguments

title

String, title of the jaspContainer

dependencies

see [`jaspOutputObjR$position()`][jaspOutputObjR]

position

see [`jaspOutputObjR$position()`][jaspOutputObjR]

info

string.

initCollapsed

Logical, should the container be collapsed by default?

jaspObject

Do not use.


Method length()

The number of elements inside the container

Usage

jaspContainerR$length()

Examples

library(jaspResults) container <- createJaspContainer(title = "This is a container") container$print()
#> container This is a container #>
container[["internal_name_1"]] <- createJaspContainer(title = "name shown to users 1") container[["internal_name_2"]] <- createJaspContainer(title = "name shown to users 2") container$print()
#> container This is a container: #> "internal_name_1": #> container name shown to users 1 #> #> "internal_name_2": #> container name shown to users 2 #> #>
# let's reverse the position container[["subcontainer1"]]$position <- 2 container[["subcontainer2"]]$position <- 1 container$print()
#> container This is a container: #> "internal_name_1": #> container name shown to users 1 #> #> "internal_name_2": #> container name shown to users 2 #> #>