-
Notifications
You must be signed in to change notification settings - Fork 4
/
rd.html
2160 lines (2135 loc) · 55.1 KB
/
rd.html
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="generator" content="pandoc" />
<meta name="author" content="Ryan Hafen" />
<title>trelliscope</title>
<script src="assets/jquery-1.11.3/jquery.min.js"></script>
<link href="assets/bootstrap-3.3.2/css/bootstrap.min.css" rel="stylesheet" />
<script src="assets/bootstrap-3.3.2/js/bootstrap.min.js"></script>
<script src="assets/bootstrap-3.3.2/shim/html5shiv.min.js"></script>
<script src="assets/bootstrap-3.3.2/shim/respond.min.js"></script>
<link href="assets/highlight-8.4/tomorrow.css" rel="stylesheet" />
<script src="assets/highlight-8.4/highlight.pack.js"></script>
<link href="assets/fontawesome-4.3.0/css/font-awesome.min.css" rel="stylesheet" />
<script src="assets/stickykit-1.1.1/sticky-kit.min.js"></script>
<script src="assets/jqueryeasing-1.3/jquery.easing.min.js"></script>
<link href="assets/packagedocs-0.0.1/pd.css" rel="stylesheet" />
<script src="assets/packagedocs-0.0.1/pd.js"></script>
<script src="assets/packagedocs-0.0.1/pd-collapse-toc.js"></script>
<style type="text/css">
.section h1 {
margin-top: 50px;
margin-bottom: 70px;
text-align: center;
border-bottom: 0px;
font-size: 35px;
font-weight: 400;
font-family: "PT Mono","Georgia",Arial,sans-serif;
}
.section h2 {
margin-left: -10px !important;
border-bottom: 3px solid #5d9fea;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
</head>
<body>
<header class="navbar navbar-white navbar-fixed-top" role="banner" id="header">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a href="http://deltarho.org"> <img src='figures/icon.png' alt='deltarho icon' width='30px' height='30px' style='margin-top: -3px;'> </a>
</span>
<a href="index.html" class="navbar-brand page-scroll">
trelliscope - Package Reference
</a>
</div>
<nav class="collapse navbar-collapse" role="navigation">
<ul class="nav nav-pills pull-right">
<li>
<a href='index.html'>Docs</a>
</li>
<li>
<a href='viewer.html'>Viewer Docs</a>
</li>
<li class="active">
<a href='rd.html'>Package Ref</a>
</li>
<li>
<a href='https://github.com/delta-rho/trelliscope'>Github <i class='fa fa-github'></i></a>
</li>
</ul>
</nav>
</div>
</header>
<!-- Begin Body -->
<div class="container">
<div class="row">
<div class="col-md-3" id="sidebar-col">
<div id="toc">
<ul>
<li><a href="#making-displays">Making Displays</a><ul>
<li><a href="#makedisplay">makeDisplay</a></li>
<li><a href="#qtrellis">qtrellis</a></li>
<li><a href="#splod">splod</a></li>
</ul></li>
<li><a href="#handling-displays">Handling Displays</a><ul>
<li><a href="#vdbconn">vdbConn</a></li>
<li><a href="#view">view</a></li>
<li><a href="#listdisplays">listDisplays</a></li>
<li><a href="#getdisplay">getDisplay</a></li>
<li><a href="#updatedisplay">updateDisplay</a></li>
<li><a href="#removedisplay">removeDisplay</a></li>
</ul></li>
<li><a href="#cognostics">Cognostics</a><ul>
<li><a href="#cog">cog</a></li>
<li><a href="#cogmean">cogMean</a></li>
<li><a href="#cogrange">cogRange</a></li>
<li><a href="#cogloessrmse">cogLoessRMSE</a></li>
<li><a href="#coghref">cogHref</a></li>
<li><a href="#cogdisplayhref">cogDisplayHref</a></li>
<li><a href="#cogscagnostics">cogScagnostics</a></li>
</ul></li>
<li><a href="#sharing-displays">Sharing Displays</a><ul>
<li><a href="#deploytoshinyapps">deployToShinyApps</a></li>
<li><a href="#synclocaldata">syncLocalData</a></li>
<li><a href="#webconn">webConn</a></li>
<li><a href="#websync">webSync</a></li>
</ul></li>
<li><a href="#misc">Misc</a><ul>
<li><a href="#splodcogfn">splodCogFn</a></li>
<li><a href="#splodpanelfn">splodPanelFn</a></li>
<li><a href="#batting">batting</a></li>
<li><a href="#nomargins">noMargins</a></li>
<li><a href="#validatestate">validateState</a></li>
<li><a href="#makestatehash">makeStateHash</a></li>
<li><a href="#makesploddata">makeSplodData</a></li>
<li><a href="#prepanel">prepanel</a></li>
<li><a href="#vdbcopyrsource">vdbCopyRSource</a></li>
<li><a href="#vdbglobalsexist">vdbGlobalsExist</a></li>
<li><a href="#vdbglobalsfile">vdbGlobalsFile</a></li>
</ul></li>
</ul>
</div>
</div>
<div class="col-md-9" id="content-col">
<div id="content-top"></div>
<h1>
Create and Navigate Large Multi-Panel Visual Displays
</h1>
<p>
<strong>Authors:</strong> <a href="mailto:rhafen@gmail.com">Ryan Hafen</a> [aut, cre],Jeremiah Rounds [ctb],Barret Schloerke [ctb],Landon Sego [ctb]
</p>
<p>
<strong>Version:</strong> 0.9.4
</p>
<p>
<strong>License:</strong> BSD_3_clause + file LICENSE
</p>
<h4>
Description
</h4>
<p>
An extension of Trellis Display that enables creation, organization, and interactive viewing of multi-panel displays created against potentially very large data sets. The dynamic viewer tiles panels of a display across the screen in a web browser and allows the user to interactively page through the panels and sort and filter them based on “cognostic” metrics computed for each panel. Panels can be created using many of R’s plotting capabilities, including base R graphics, ‘lattice’, ‘ggplot2’, and many ‘htmlwidgets’. Conditioning is handled through the ‘datadr’ package, which enables ‘Trelliscope’ displays with potentially millions of panels to be created against terabytes of data on systems like ‘Hadoop’. While designed to scale, ‘Trelliscope’ displays can also be very useful for small data sets.
</p>
<h4>
Depends
</h4>
<p>
R (>= 3.0.0), datadr (>= 0.8.5),
</p>
<h4>
Imports
</h4>
<p>
lattice (>= 0.20-23), ggplot2, data.table, base64enc, shiny (>= 0.12.0), htmlwidgets (>= 0.5.0), digest, jsonlite, hexbin, png, rsconnect
</p>
<h4>
Suggests
</h4>
<p>
Cairo, dplyr, testthat (>= 0.11.0), roxygen2 (>= 5.0.1), scagnostics, housingData
</p>
<h4>
Enhances
</h4>
<p>
(none)
</p>
<div id="making-displays" class="section level1">
<h1>Making Displays</h1>
<div id="makedisplay" class="section level2">
<h2>makeDisplay</h2>
<h3>
Create a Trelliscope Display
</h3>
<p class="rd-p">
Create a trelliscope display and add it to a visualization database (VDB)
</p>
<h4>
Usage
</h4>
<pre class="r"><code>makeDisplay(data, name, group = "common", desc = "", mdDesc = NULL,
height = 500, width = 500, panelFn = NULL, lims = list(x = "free", y =
"free", prepanelFn = NULL), cogFn = NULL, state = NULL,
preRender = FALSE, cogConn = dfCogConn(), output = NULL,
conn = getOption("vdbConn"), verbose = TRUE, keySig = NULL,
params = NULL, packages = NULL, control = NULL, detectGlobals = TRUE)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
data
</dt>
<dd class="rd-dd">
data of class “ddo” or “ddf” (see <code><a href=http://www.inside-r.org/packages/cran/datadr/docs/ddo>ddo</a></code>, <code><a href=http://www.inside-r.org/packages/cran/datadr/docs/ddf>ddf</a></code>)
</dd>
<dt>
name
</dt>
<dd class="rd-dd">
the name of the display (no special characters, spaces are converted to underscores)
</dd>
<dt>
group
</dt>
<dd class="rd-dd">
the group the display belongs to, where displays are organized into groups (no special characters, spaces are converted to underscores). Defaults to “common”
</dd>
<dt>
desc
</dt>
<dd class="rd-dd">
a description of the display (used in the viewer)
</dd>
<dt>
mdDesc
</dt>
<dd class="rd-dd">
an optional longer-form description of the display and data, which can be text or can be a path to a markdown file or file with html snippets. The description will appear in the “Display Information” panel in the Trelliscope viewer.
</dd>
<dt>
height
</dt>
<dd class="rd-dd">
reference dimensions (in pixels) for each panel (panels will be resized based on available space in the viewer)
</dd>
<dt>
width
</dt>
<dd class="rd-dd">
reference dimensions (in pixels) for each panel (panels will be resized based on available space in the viewer)
</dd>
<dt>
panelFn
</dt>
<dd class="rd-dd">
a function that produces a plot and takes one argument, which will be the current split of the data being passed to it. It is recommended that you first test <code>panelFn</code> on a single key-value pair using <code>panelFn(data[[1]][[2]])</code>. This function must return either an object of class “ggplot”, “trellis”, or return “NULL” (for base plot commands)
</dd>
<dt>
lims
</dt>
<dd class="rd-dd">
either an object of class “trsLims” as obtained from <code><a href=#setlims>setLims</a></code> or a list with elements x, y, and prepanelFn, that specify how to apply <code><a href=#prepanel>prepanel</a></code> and <code><a href=#setlims>setLims</a></code>
</dd>
<dt>
cogFn
</dt>
<dd class="rd-dd">
a function that returns a named list, where each element of the list is a cognostic feature (with length 1). This list must be coerceable to a 1-row data frame. The function should take one argument, which will be the current split of the data being passed to it. Useful to test with <code>cogFn(divExample(dat))</code>
</dd>
<dt>
state
</dt>
<dd class="rd-dd">
if specified, this tells the viewer the default parameter settings (such as layout, sorting, filtering, etc.) to use when the display is viewed (see <code><a href=#validatestate>validateState</a></code> for details)
</dd>
<dt>
preRender
</dt>
<dd class="rd-dd">
should the panels be pre-rendered and stored (<code>TRUE</code>), or rendered on-the-fly (<code>FALSE</code>, default)? Default is recommended unless rendering is very expensive. See Details.
</dd>
<dt>
cogConn
</dt>
<dd class="rd-dd">
a connection to store the cognostics data. By default, this is <code><a href=#dfcogconn>dfCogConn</a>()</code>.
</dd>
<dt>
output
</dt>
<dd class="rd-dd">
how to store the panels and metadata for the display (unnecessary to specify in most cases – see details)
</dd>
<dt>
conn
</dt>
<dd class="rd-dd">
VDB connection info, typically stored in options(“vdbConn”) at the beginning of a session, and not necessary to specify here if a valid “vdbConn” object exists
</dd>
<dt>
verbose
</dt>
<dd class="rd-dd">
print status messages?
</dd>
<dt>
keySig
</dt>
<dd class="rd-dd">
a user-defined key signature (string - see details)
</dd>
<dt>
params
</dt>
<dd class="rd-dd">
a named list of objects external to the input data that are needed in the distributed computing (most should be taken care of automatically such that this is rarely necessary to specify)
</dd>
<dt>
packages
</dt>
<dd class="rd-dd">
a vector of R package names that contain functions used in <code>panelFn</code> or <code>cogFn</code> (most should be taken care of automatically such that this is rarely necessary to specify)
</dd>
<dt>
control
</dt>
<dd class="rd-dd">
parameters specifying how the backend should handle things (most-likely parameters to <code>rhwatch</code> in RHIPE) - see <code><a href=http://www.inside-r.org/packages/cran/datadr/docs/rhipeControl>rhipeControl</a></code> and <code><a href=http://www.inside-r.org/packages/cran/datadr/docs/localDiskControl>localDiskControl</a></code>
</dd>
<dt>
detectGlobals
</dt>
<dd class="rd-dd">
if TRUE params are automatically detected (packages are always auto-detected)
</dd>
</dl>
<h4>
Details
</h4>
<p class="rd-p">
Many of the parameters are optional or have defaults. For several examples, see the documentation at deltarho.org: <a href = http://deltarho.org/docs-trelliscope>http://deltarho.org/docs-trelliscope</a>
</p>
<p class="rd-p">
Panels by default are not pre-rendered. Instead, this function creates a display object and computes and stores the cognostics. Panels are then rendered on the fly by the DeltaRho backend and pushed to the Trelliscope viewer as html with the panel images embedded in the html. If a user would like to pre-render the images for every subset (using <code>preRender = TRUE</code>), then by default the image files for the panels will be stored to a local disk connection (see <code><a href=http://www.inside-r.org/packages/cran/datadr/docs/localDiskConn>localDiskConn</a></code>) inside the VDB directory, organized in subdirectories by group and name of the display. Optionally, the user can specify the <code>output</code> parameter to be any valid “kvConnection” object, as long as it is one that persists on disk (e.g. <code><a href=http://www.inside-r.org/packages/cran/datadr/docs/hdfsConn>hdfsConn</a></code>).
</p>
<p class="rd-p">
<code>keySig</code> does not generally need to be specified. It is useful to specify when creating multiple displays that you would like to be treated as related displays, so that you can view them side by side. Two displays are determined to be related when their key signatures, typically computed as a md5 hash of the complete collection of keys, match. Sometimes two displays will have data where the keys match for a significant portion of subsets, but not all. Manually specifying the same <code>keySig</code> for each can ensure that they will be treated as related displays.
</p>
<h4>
Examples
</h4>
<pre class="r"><code># see docs</code></pre>
<h4>
See also
</h4>
<p><code><a href=#prepanel>prepanel</a></code>, <code><a href=#setlims>setLims</a></code>, <code><a href=http://www.inside-r.org/packages/cran/datadr/docs/divide>divide</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
<div id="qtrellis" class="section level2">
<h2>qtrellis</h2>
<h3>
Quick trelliscope display for data frame-like inputs
</h3>
<h4>
Usage
</h4>
<pre class="r"><code>qtrellis(x, panel = NULL, cog = NULL, by = NULL, layout = c(1, 1),
conn = getOption("vdbConn"), ...)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
x
</dt>
<dd class="rd-dd">
either a data frame
</dd>
<dt>
panel
</dt>
<dd class="rd-dd">
a function taking one argument (which will be a subset of the input data frame) and returning a plot
</dd>
<dt>
cog
</dt>
<dd class="rd-dd">
an optional cognostics funtion to be applied to each subset
</dd>
<dt>
by
</dt>
<dd class="rd-dd">
if the input is a data frame, a character vector of column names to split the data by
</dd>
<dt>
layout
</dt>
<dd class="rd-dd">
a vector indicating the number of rows and columns to arrange the panels in by default
</dd>
<dt>
conn
</dt>
<dd class="rd-dd">
VDB connection info, typically stored in options(“vdbConn”) at the beginning of a session, and not necessary to specify here if a valid “vdbConn” object exists or if you would like to use a temporary one for this display
</dd>
<dt>
…
</dt>
<dd class="rd-dd">
parameters passed to <code><a href=#makedisplay>makeDisplay</a></code> - most importantly <code>name</code>, <code>group</code> (see note below), <code>width</code>, and <code>height</code>
</dd>
</dl>
<h4>
Note
</h4>
<p class="rd-p">
If you dont have a vdb connection set up (see <code><a href=#vdbconn>vdbConn</a></code>), a temporary one will be created and used, and you can think of the plot as disposable. If you would like the plot to persist, set up a vdb connection. Likewise, if you dont supply <code>name</code> and <code>group</code>, the plot will be stored under defaults “qtrellis_plot” and “__qtrellis“, and a subsequent call will cause the previous display with this name and group to be replaced. Therefore, if you want your display to persist, make sure a vdb connection has been set up prior to calling this function, and give it a unique name.
</p>
<h4>
Examples
</h4>
<pre class="r"><code>panel <- function(x)
xyplot(Sepal.Width ~ Sepal.Length, data = x)
p <- datadr::divide(iris, by = "Species") %>%
qtrellis(panel, layout = c(1, 3))
p
# data frame input (need to specify 'by')
iris %>% qtrellis(panel, by = "Species")
# dplyr grouped tbl input
library(dplyr)
p <- iris %>%
group_by(Species) %>%
qtrellis(panel, layout = c(1, 3))
p</code></pre>
</div>
<div id="splod" class="section level2">
<h2>splod</h2>
<h3>
Create a Scatterplot Display
</h3>
<p class="rd-p">
Create a scatterplot display (splod)
</p>
<h4>
Usage
</h4>
<pre class="r"><code>splod(data, id.vars = NULL, name = NULL, desc = NULL,
cogFn = splodCogFn, panelFn = splodPanelFn, verbose = TRUE, ...)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
data
</dt>
<dd class="rd-dd">
a data.frame or an object of class “splodDat”
</dd>
<dt>
id.vars
</dt>
<dd class="rd-dd">
variables to ignore when computing all pairs of variables
</dd>
<dt>
name, desc, cogFn, panelFn, verbose, …
</dt>
<dd class="rd-dd">
parameters passed to <code><a href=#makedisplay>makeDisplay</a></code>
</dd>
</dl>
<h4>
Value
</h4>
<p class="rd-p">
<dl>
an object of class localDiv that can be passed to <code><a href=#splod>splod</a></code>
</dl>
</p>
<h4>
References
</h4>
<p class="rd-p">
Wilkinsons scagnostics paper.
</p>
<h4>
See also
</h4>
<p><code><a href=#makedisplay>makeDisplay</a></code>, <code><a href=#makesploddata>makeSplodData</a></code>, <code><a href=#splodpanelfn>splodPanelFn</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
</div>
<div id="handling-displays" class="section level1">
<h1>Handling Displays</h1>
<div id="vdbconn" class="section level2">
<h2>vdbConn</h2>
<h3>
Connect to a VDB
</h3>
<p class="rd-p">
Connect to a new or existing visualization database
</p>
<h4>
Usage
</h4>
<pre class="r"><code>vdbConn(path, name = NULL, autoYes = FALSE, updateFiles = TRUE,
verbose = TRUE)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
path
</dt>
<dd class="rd-dd">
The path on the local file system where the directory for the VDB is located
</dd>
<dt>
name
</dt>
<dd class="rd-dd">
A character string giving the name of the VDB. If the VDB already exists and <code>name = NULL</code>, the previous name is used. If the VDB exists and a string is provided for <code>name</code>, the name is overwritten. The primary purpose of the <code>name</code> argument is to facilitate deploying the trelliscope display as a Shiny app. See the <code>appName</code> argument of <code><a href=http://www.inside-r.org/packages/cran/trelliscope/docs/deployToShinyApps>deployToShinyApps</a></code>
</dd>
<dt>
autoYes
</dt>
<dd class="rd-dd">
should questions to proceed with directory creation operations be automatically answered with “yes”?
</dd>
<dt>
updateFiles
</dt>
<dd class="rd-dd">
upon connection, should the Trelliscope viewer app files be updated in the VDB directory?
</dd>
<dt>
verbose
</dt>
<dd class="rd-dd">
should messages be printed about what is being done?
</dd>
</dl>
<h4>
Details
</h4>
<p class="rd-p">
Connecting to a VDB is required prior to calling <code><a href=#makedisplay>makeDisplay</a></code> or <code><a href=#view>view</a></code>.
</p>
<h4>
Value
</h4>
<p class="rd-p">
<dl>
An object of class <code>vdbConn</code> that contains the path and name of the VDB. This object is also assigned to the <code>vdbConn</code> option, and can be retrieved via <code>getOption(“vdbConn”)</code>
</dl>
</p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
<div id="view" class="section level2">
<h2>view</h2>
<h3>
View a Display or Run Shiny Display Viewer
</h3>
<p class="rd-p">
View a display or run Shiny display viewer
</p>
<h4>
Usage
</h4>
<pre class="r"><code>view(name = NULL, group = NULL, state = NULL, openBrowser = TRUE,
conn = getOption("vdbConn"), port = getOption("trelliscopePort"))</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
name, group
</dt>
<dd class="rd-dd">
optional parameters to load the viewer with a pre-specified display - if not specified, the viewer will launch with a list to choose from
</dd>
<dt>
state
</dt>
<dd class="rd-dd">
an optional list of state variables to set the default viewing state for layout, sorting, filtering, and labels (see details)
</dd>
<dt>
openBrowser
</dt>
<dd class="rd-dd">
should the browser be automatically launched?
</dd>
<dt>
conn
</dt>
<dd class="rd-dd">
VDB connection info, typically stored in options(“vdbConn”) at the beginning of a session, and not necessary to specify here if a valid “vdbConn” object exists
</dd>
<dt>
port
</dt>
<dd class="rd-dd">
what port to use for the viewer - if not specified, will look for “trelliscopePort” set in Rs global options, followed by a search for a system-level environment variable “TRELLISCOPE_PORT”. If none of these are defined, a random port assigned provided by shiny will be used.
</dd>
</dl>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
<div id="listdisplays" class="section level2">
<h2>listDisplays</h2>
<h3>
List Displays in a VDB
</h3>
<p class="rd-p">
List displays in a VDB.
</p>
<h4>
Usage
</h4>
<pre class="r"><code>listDisplays(conn = getOption("vdbConn"))</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
conn
</dt>
<dd class="rd-dd">
VDB connection info, typically stored in options(“vdbConn”) at the beginning of a session, and not necessary to specify here if a valid “vdbConn” object exists
</dd>
</dl>
<h4>
See also
</h4>
<p><code><a href=#makedisplay>makeDisplay</a></code>, <code><a href=#removedisplay>removeDisplay</a></code>, <code><a href=#view>view</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
<div id="getdisplay" class="section level2">
<h2>getDisplay</h2>
<h3>
Retrieve Display Object from VDB
</h3>
<p class="rd-p">
Retrieve a display object from a VDB.
</p>
<h4>
Usage
</h4>
<pre class="r"><code>getDisplay(name, group = NULL, conn = getOption("vdbConn"))</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
name
</dt>
<dd class="rd-dd">
the name of the display
</dd>
<dt>
group
</dt>
<dd class="rd-dd">
the group of the display
</dd>
<dt>
conn
</dt>
<dd class="rd-dd">
VDB connection info, typically stored in options(“vdbConn”) at the beginning of a session, and not necessary to specify here if a valid “vdbConn” object exists
</dd>
</dl>
<h4>
Details
</h4>
<p class="rd-p">
If a display is uniquely determined by its name, then group is not required.
</p>
<h4>
Value
</h4>
<p class="rd-p">
<dl>
a display object
</dl>
</p>
<h4>
See also
</h4>
<p><code><a href=#makedisplay>makeDisplay</a></code>, <code><a href=#removedisplay>removeDisplay</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
<div id="updatedisplay" class="section level2">
<h2>updateDisplay</h2>
<h3>
Update a Display Object
</h3>
<h4>
Usage
</h4>
<pre class="r"><code>updateDisplay(name, ..., group = NULL, conn = getOption("vdbConn"))</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
name
</dt>
<dd class="rd-dd">
the name of the display
</dd>
<dt>
group
</dt>
<dd class="rd-dd">
the group the display belongs to
</dd>
<dt>
conn
</dt>
<dd class="rd-dd">
VDB connection info, typically stored in options(“vdbConn”) at the beginning of a session, and not necessary to specify here if a valid “vdbConn” object exists
</dd>
<dt>
…
</dt>
<dd class="rd-dd">
display parameters to update which must be one of “desc”, “width”, “height”, “keySig”, “panelFn”, “state” - see <code><a href=#makedisplay>makeDisplay</a></code> for details on these parameters.
</dd>
</dl>
</div>
<div id="removedisplay" class="section level2">
<h2>removeDisplay</h2>
<h3>
Remove a Display from a VDB
</h3>
<p class="rd-p">
Remove a display from a VDB.
</p>
<h4>
Usage
</h4>
<pre class="r"><code>removeDisplay(name = NULL, group = NULL, conn = getOption("vdbConn"),
autoYes = FALSE, verbose = TRUE)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
name
</dt>
<dd class="rd-dd">
the name of the display
</dd>
<dt>
group
</dt>
<dd class="rd-dd">
the group of the display
</dd>
<dt>
conn
</dt>
<dd class="rd-dd">
VDB connection info, typically stored in options(“vdbConn”) at the beginning of a session, and not necessary to specify here if a valid “vdbConn” object exists
</dd>
<dt>
autoYes
</dt>
<dd class="rd-dd">
should questions to proceed with display removal be automatically answered with “yes”?
</dd>
<dt>
verbose
</dt>
<dd class="rd-dd">
logical - print messages about what is being done
</dd>
</dl>
<h4>
Details
</h4>
<p class="rd-p">
If a display is uniquely determined by its name, then group is not required.
</p>
<h4>
See also
</h4>
<p><code><a href=#makedisplay>makeDisplay</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
</div>
<div id="cognostics" class="section level1">
<h1>Cognostics</h1>
<div id="cog" class="section level2">
<h2>cog</h2>
<h3>
Create a Cognostics Object
</h3>
<p class="rd-p">
Create a cognostics object. To be used inside of the function passed to the <code>cogFn</code> argument of <code><a href='makeDisplay.html'>makeDisplay</a></code> for each cognostics value to be computed for each subset.
</p>
<h4>
Usage
</h4>
<pre class="r"><code>cog(val = NULL, desc = "", group = "common", type = NULL,
defLabel = FALSE, defActive = TRUE, filterable = TRUE,
sortable = TRUE, log = NULL)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
val
</dt>
<dd class="rd-dd">
a scalar value (numeric, characer, date, etc.)
</dd>
<dt>
desc
</dt>
<dd class="rd-dd">
a description for this cognostic value
</dd>
<dt>
group
</dt>
<dd class="rd-dd">
optional categorization of the cognostic for organizational purposes
</dd>
<dt>
type
</dt>
<dd class="rd-dd">
the desired type of cognostic you would like to compute (see details)
</dd>
<dt>
defLabel
</dt>
<dd class="rd-dd">
should this cognostic be used as a panel label in the viewer by default?
</dd>
<dt>
defActive
</dt>
<dd class="rd-dd">
should this cognostic be active (available for sort / filter / sample) by default?
</dd>
<dt>
filterable
</dt>
<dd class="rd-dd">
should this cognostic be filterable? Default is <code>TRUE</code>. It can be useful to set this to <code>FALSE</code> if the cognostic is categorical with many unique values and is only desired to be used as a panel label.
</dd>
<dt>
sortable
</dt>
<dd class="rd-dd">
should this cognostic be sortable?
</dd>
<dt>
log
</dt>
<dd class="rd-dd">
when being used in the viewer for visual univariate and bivariate filters, should the log be computed? Useful when the distribution of the cognostic is very long-tailed or has large outliers. Can either be a logical or a positive integer indicating the base.
</dd>
</dl>
<h4>
Details
</h4>
<p class="rd-p">
Different types of cognostics can be specified through the <code>type</code> argument that will affect how the user is able to interact with those cognostics in the viewer. This can usually be ignored because it will be inferred from the implicit data type of <code>val</code>. But there are special types of cognostics, such as geographic coordinates and relations (not implemented) that can be specified as well. Current possibilities for <code>type</code> are “key”, “integer”, “numeric”, “factor”, “date”, “time”, “geo”, “rel”, “hier”, “href”.
</p>
<h4>
Value
</h4>
<p class="rd-p">
<dl>
object of class “cog”
</dl>
</p>
<h4>
See also
</h4>
<p><code><a href=#makedisplay>makeDisplay</a></code>, <code><a href=#cogrange>cogRange</a></code>, <code><a href=#cogmean>cogMean</a></code>, <code><a href=#cogscagnostics>cogScagnostics</a></code>, <code><a href=#cogloessrmse>cogLoessRMSE</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
<div id="cogmean" class="section level2">
<h2>cogMean</h2>
<h3>
Compute Mean Cognostic
</h3>
<p class="rd-p">
Compute mean to be used as cognostics in a trelliscope display.
</p>
<h4>
Usage
</h4>
<pre class="r"><code>cogMean(x, desc = "mean", group = "common", defLabel = FALSE,
defActive = TRUE, filterable = TRUE, sortable = TRUE, log = FALSE)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
x
</dt>
<dd class="rd-dd">
numeric vector from which to compute the mean
</dd>
<dt>
desc, group, defLabel, defActive, filterable, sortable, log
</dt>
<dd class="rd-dd">
arguments passed to <code><a href=#cog>cog</a></code>
</dd>
</dl>
<h4>
Examples
</h4>
<pre class="r"><code>cogMean(rnorm(100))</code></pre>
<h4>
See also
</h4>
<p><code><a href=#cog>cog</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>
<div id="cogrange" class="section level2">
<h2>cogRange</h2>
<h3>
Compute Range Cognostic
</h3>
<p class="rd-p">
Compute range to be used as cognostics in a trelliscope display.
</p>
<h4>
Usage
</h4>
<pre class="r"><code>cogRange(x, desc = "range (max - min)", group = "common",
defLabel = FALSE, defActive = TRUE, filterable = TRUE,
sortable = TRUE, log = FALSE)</code></pre>
<h4>
Arguments
</h4>
<dl class="rd-dl">
<dt>
x
</dt>
<dd class="rd-dd">
numeric vector from which to compute the range
</dd>
<dt>
desc, group, defLabel, defActive, filterable, sortable, log
</dt>
<dd class="rd-dd">
arguments passed to <code><a href=#cog>cog</a></code>
</dd>
</dl>
<h4>
Examples
</h4>
<pre class="r"><code>cogRange(rnorm(100))</code></pre>
<h4>
See also
</h4>
<p><code><a href=#cog>cog</a></code></p>
<h4>
Author
</h4>
<p>Ryan Hafen</p>
</div>