Description Usage Arguments Details Examples
Set State Parameters
1 2 |
name |
the name of the display |
group |
the group of the display |
labels |
a vector of names of cognostics to be shown as labels underneath each panel. If not specified, the default is to show labels for any of the splitting variables that created the partition of the data being plotted. |
layout |
a list with optional elements |
sort |
a named list where each name corresponds to a cognostic name and the value is either "asc" or "desc" for sorting in ascending or descending order. The order in which sorting is applied to each variable is according to the order of the variables specified. |
filter |
a named list where each name corresponds to a cognostic name and the value is a specification of either "regex" or "select" for categorical variables, or a range, "from" and "to", for quantitative variables. For a "regex", a simple regular expression string is specified, and the filter finds all matches for the regular expression against the variable. For "select" a vector of strings is specified, and all exact matches are returned. For the range filter, all values of the specified variable within the range "from" and "to" are returned. If either "from" or "to" are omitted, they are treated as |
Trelliscope allows you to specify either a default state in makeDisplay
or specify the state of the display when you call view
.
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)
|
Loading required package: datadr
Note: trelliscope will eventually be superseded by trelliscopejs: https://github.com/hafen/trelliscopejs
[1] "name=my_display&group=common&layout=nrow:2,ncol:4,arrange:row&sort=state:desc,county:asc&filter=county:(regex:Ben),state:(select:OR;WA),meanList:(from:50;to:150)&labels=county,state"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.