1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
parms: {
    binwidth: "0.5",
    binoffset: "0",
    check1: "FALSE",
    check2: "FALSE"
},
data: [
    'carsWorking <- mtcars',
    'trialLine <- data.frame(wt=c(1.4,5.4),mpg=c(20,20))'
],
basevis: [
    'quote(carsWorking)',
    'props(x ~ wt, y ~ mpg)',
    'mark_symbol(props(fill="blue", dragx="x,carsWorking,wt", dragy="y
,carsWorking,mpg"))',
    'scale_quantitative("x", domain=c(0, 7.0), range="width")',
    'if (gvParms$check1) branch_smooth(props(stroke="red", strokeWidth=3
), method="lm", n=2L)',
    'mark_symbol(props(fill="green", shape="diamond", dragy="y,trialLine
,mpg"), trialLine)',
    'mark_line(props(stroke="green", strokeWidth=2), trialLine)',
    'branch_histogram(props(fill="gray", fillOpacity=0.3), binwidth
=gvParms$binwidth, origin=gvParms$binwidth*gvParms$binoffset)'
],
scenarios: {
    binoffset: "seq(0.1, 0.9, 0.1)"
},
scenariovis: [
    'if (gvParms$check2) branch_histogram(props(fill="green", stroke=NA, 
fillOpacity=0.1), binwidth=gvParms$binwidth, origin=gvParms$binwidth
*gvParms$binoffset)'
],
measures: [
    'r squared=rsquared(sluice(transform_scale(), props(x~wt, y~mpg), 
carsWorking), sluice(transform_scale(), props(x~wt, y~mpg), trialLine))'
    ,'debug stuff=Sys.time()'
    ],
    
vis2: [
    'quote(carsWorking)',
    'mark_table()'
]
X
Initialise
Run
Stop
Reset