validateState: Validate State Parameters

Description Usage Arguments Value Note See Also Examples

Description

Validate state parameters for a Trelliscope display

Usage

1
validateState(x, displayObj = NULL, checkDisplay = TRUE)

Arguments

x

a list of state parameter settings (such as layout, sorting, filtering, etc.) to use when the display is viewed (see details)

displayObj

a display object to validate against (if not provided and checkDisplay is TRUE, it will be fetched based on x)

checkDisplay

should the state be checked against a display (to make sure fields match, etc.) or should it simply be checked for structure?

Value

a modified state parameter list that is valid, an object of class "cogState"

Note

See stateSpec for details on how to specify state.

See Also

view, cogDisplayHref

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
state <- stateSpec(
  name = "my_display",
  sort = list(state = "desc", county = "asc"),
  filter = list(
    county = list(regex = "Ben"),
    state = list(select = c("OR", "WA")),
    meanList = list(from = 50, to = 150)
  ),
  layout = list(nrow = 2, ncol = 4),
  labels = c("county", "state")
)

state <- validateState(state, checkDisplay = FALSE)

makeStateHash(state)

tesseradata/trelliscope documentation built on May 31, 2019, 8:58 a.m.