-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfunctionref.html
2702 lines (1816 loc) · 95 KB
/
functionref.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>datadr R function reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/custom/custom.css" rel="stylesheet">
<!-- font-awesome -->
<link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<!-- prism -->
<link href="assets/prism/prism.css" rel="stylesheet">
<link href="assets/prism/prism.r.css" rel="stylesheet">
<script type='text/javascript' src='assets/prism/prism.js'></script>
<script type='text/javascript' src='assets/prism/prism.r.js'></script>
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<![endif]-->
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<!-- <link href='http://fonts.googleapis.com/css?family=Lustria' rel='stylesheet' type='text/css'> -->
<link href='http://fonts.googleapis.com/css?family=Bitter' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Raleway:300' rel='stylesheet' type='text/css'>
<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
<!-- <link rel="shortcut icon" href="ico/favicon.png"> -->
</head>
<body>
<div class="container-narrow">
<div class="masthead">
<ul class="nav nav-pills pull-right">
<li class=''><a href='index.html'>Docs</a></li><li class='active'><a href='functionref.html'>Function Ref</a></li><li><a href='https://github.com/delta-rho/datadr'>Github <i class='fa fa-github'></i></a></li>
</ul>
<a class='navbar-brand' href='http://deltarho.org'>
<img src='figures/icon.png' alt='deltarho icon' width='30px' height='30px' style='margin-top: -6px;'>
DeltaRho
</a>
<p class="myHeader">datadr R function reference</p>
</div>
<hr>
<div class="container-fluid">
<div class="row-fluid">
<div class="col-md-3 well">
<ul class = "nav nav-list" id="toc">
<li class='nav-header'>Contents</li> <li class="active">
<a target="_self" class="nav-not-header" href="#packagemain">Package Info</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#adddata">addData</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#addtransform">addTransform</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#adult">adult</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#applytransform">applyTransform</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#asdataframeddf">as.data.frame.ddf</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#aslistddo">as.list.ddo</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#bsv">bsv</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#charfilehash">charFileHash</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#combcollect">combCollect</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#combddo">combDdo</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#combmean">combMean</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#combmeancoef">combMeanCoef</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#combrbind">combRbind</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#conddiv">condDiv</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#convert">convert</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#datadr">datadr</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#ddf-class">ddf-class</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#ddf">ddf</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#kvexample">kvExample</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#ddo">ddo</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#setattributes">setAttributes</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#digestfilehash">digestFileHash</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#divide">divide</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#dfsplit">dfSplit</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#draggregate">drAggregate</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drblb">drBLB</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drfilter">drFilter</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drgetglobals">drGetGlobals</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drglm">drGLM</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drhexbin">drHexbin</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drjoin">drJoin</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drlapply">drLapply</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drquantile">drQuantile</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drreadtable">drRead.table</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drsample">drSample</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#drsubset">drSubset</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#flatten">flatten</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#getbsv">getBsv</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#getbsvs">getBsvs</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#getcondcuts">getCondCuts</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#getsplitvar">getSplitVar</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#getsplitvars">getSplitVars</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#hdfsconn">hdfsConn</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#kvapply">kvApply</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#kvpairs">kvPairs</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#localdiskconn">localDiskConn</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#localdiskcontrol">localDiskControl</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#makeextractable">makeExtractable</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#mrexec">mrExec</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#tabulatemap">tabulateMap</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#printddo">print.ddo</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#printkvpair">print.kvPair</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#printkvvalue">print.kvValue</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#readhdfstextfile">readHDFStextFile</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#readtextfilebychunk">readTextFileByChunk</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#recombine">recombine</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#removedata">removeData</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#rhipecontrol">rhipeControl</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#rrdiv">rrDiv</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#setuptransformenv">setupTransformEnv</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#sparkcontrol">sparkControl</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#sparkdataconn">sparkDataConn</a>
</li>
<li class="">
<a target="_self" class="nav-not-header" href="#updateattributes">updateAttributes</a>
</li>
</ul>
</div>
<div class="col-md-9 tab-content" id="main-content">
<!-- packagemain -->
<div class="tab-pane active" id="packagemain">
<h3>Divide and Recombine for Large, Complex Data</h3>
<p><strong>Author:</strong> Ryan Hafen</p>
<p><strong>Version:</strong> 0.7.5</p>
<p><strong>Date:</strong> 2015-01-06</p>
<p><strong>License:</strong> BSD_3_clause + file LICENSE</p>
<h4>Description</h4>
<p>Methods for dividing data into subsets, applying analytical
methods to the subsets, and recombining the results. Comes with a generic
MapReduce interface as well. Works with key-value pairs stored in memory,
on local disk, or on HDFS, in the latter case using the R and Hadoop
Integrated Programming Environment (RHIPE). Also includes experimental
support for key-value pairs stored as Spark RDDs using the SparkR package.</p>
<h4>Depends</h4>
<p>
R (>= 2.15.1)</p>
<h4>Suggests</h4>
<p>
testthat (>= 0.8.1),
roxygen2 (>= 4.0.0),
Rhipe,
SparkR</p>
</div>
<!-- addData -->
<div class="tab-pane" id="adddata">
<h3 class="fref_title">Add Key-Value Pairs to a Data Connection</h3>
<h4>Description</h4>
Add key-value pairs to a data connection
<h4>Usage</h4>
<pre><code class="language-r"><div>addData(conn, data, overwrite = FALSE)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>conn</dt>
<dd>a kvConnection object</dd>
<dt>data</dt>
<dd>a list of key-value pairs (list of lists where each sub-list has two elements, the key and the value)</dd>
<dt>overwrite</dt>
<dd>if data with the same key is already present in the data, should it be overwritten? (does not work for HDFS connections)</dd>
</dl>
<h4>Note</h4>
<p>This is generally not recommended for HDFS as it writes a new file each time it is called, and can result in more individual files than Hadoop likes to deal with.</p>
<h4>See also</h4>
<code><a href='#removedata'>removeData</a></code>, <code><a href='#localdiskconn'>localDiskConn</a></code>, <code><a href='#hdfsconn'>hdfsConn</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- addTransform -->
<div class="tab-pane" id="addtransform">
<h3 class="fref_title">Add a Transformation Function to a Distributed Data Object</h3>
<h4>Description</h4>
Add a transformation function to be applied to each subset of a distributed data object
<h4>Usage</h4>
<pre><code class="language-r"><div>addTransform(obj, fn, name = NULL, params = NULL, packages = NULL)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>obj</dt>
<dd>a distributed data object</dd>
<dt>fn</dt>
<dd>a function to be applied to each subset of <code>obj</code></dd>
<dt>name</dt>
<dd>optional name of the transformation</dd>
<dt>params</dt>
<dd>a named list of parameters external to <code>obj</code> that are needed in the transformation function (most should be taken care of automatically such that this is rarely necessary to specify)</dd>
<dt>packages</dt>
<dd>a vector of R package names that contain functions used in <code>fn</code> (most should be taken care of automatically such that this is rarely necessary to specify)</dd>
</dl>
<h4>Details</h4>
<p>When you add a transformation to a distributed data object, the transformation is not applied immediately, but is deferred until a function that kicks off a computation is done. These include <code><a href='#divide'>divide</a></code>, <code><a href='#recombine'>recombine</a></code>, <code><a href='#drjoin'>drJoin</a></code>, <code><a href='#drlapply'>drLapply</a></code>, <code><a href='#drfilter'>drFilter</a></code>, <code><a href='#drsample'>drSample</a></code>, <code>drSubset</code>. When any of these are invoked on an object with a transformation attached to it, the transformation will be applied in the map phase of computation prior to any other computation. The transformation will also be applied any time a subset of the data is requested. Thus although the data has not been physically transformed after a call of <code>addTransform</code>, we can think of it conceptually as already being transformed.</p>
<p>When <code>addTransform</code> is called, it is tested on a subset of the data to make sure we have all of the necessary global variables and packages loaded necessary to portably perform the transformation.</p>
<p>It is possible to add multiple transformations to a distributed data object, in which case they are applied in the order supplied, but only one transform should be necessary.</p>
</div>
<!-- adult -->
<div class="tab-pane" id="adult">
<h3 class="fref_title">"Census Income" Dataset</h3>
<h4>Description</h4>
"Census Income" dataset from UCI machine learning repository
<h4>Usage</h4>
<pre><code class="language-r"><div>adult</div></code></pre>
<h4>Format</h4>
<p>(From UCI machine learning repository)</p>
<p><ul>
<li> age. continuous
</li>
<li> workclass. Private, Self-emp-not-inc, Self-emp-inc, Federal-gov, Local-gov, State-gov, Without-pay, Never-worked
</li>
<li> fnlwgt. continuous
</li>
<li> education. Bachelors, Some-college, 11th, HS-grad, Prof-school, Assoc-acdm, Assoc-voc, 9th, 7th-8th, 12th, Masters, 1st-4th, 10th, Doctorate, 5th-6th, Preschool
education-num: continuous
</li>
<li> marital. Married-civ-spouse, Divorced, Never-married, Separated, Widowed, Married-spouse-absent, Married-AF-spouse
</li>
<li> occupation. Tech-support, Craft-repair, Other-service, Sales, Exec-managerial, Prof-specialty, Handlers-cleaners, Machine-op-inspct, Adm-clerical, Farming-fishing, Transport-moving, Priv-house-serv, Protective-serv, Armed-Forces
</li>
<li> relationship. Wife, Own-child, Husband, Not-in-family, Other-relative, Unmarried
</li>
<li> race. White, Asian-Pac-Islander, Amer-Indian-Eskimo, Other, Black
</li>
<li> sex. Female, Male
</li>
<li> capgain. continuous
</li>
<li> caploss. continuous
</li>
<li> hoursperweek. continuous
</li>
<li> nativecountry. United-States, Cambodia, England, Puerto-Rico, Canada, Germany, Outlying-US(Guam-USVI-etc), India, Japan, Greece, South, China, Cuba, Iran, Honduras, Philippines, Italy, Poland, Jamaica, Vietnam, Mexico, Portugal, Ireland, France, Dominican-Republic, Laos, Ecuador, Taiwan, Haiti, Columbia, Hungary, Guatemala, Nicaragua, Scotland, Thailand, Yugoslavia, El-Salvador, Trinadad&Tobago, Peru, Hong, Holand-Netherlands
</li>
<li> income. <=50K, >50K
</li>
<li> incomebin. 0 if income<=50K, 1 if income>50K
</li>
</ul></p>
<h4>"Census Income" Dataset</h4>
<h4>References</h4>
<p>Bache, K. & Lichman, M. (2013). UCI Machine Learning Repository [<a href = 'http://archive.ics.uci.edu/ml'>http://archive.ics.uci.edu/ml</a>]. Irvine, CA: University of California, School of Information and Computer Science.</p>
</div>
<!-- applyTransform -->
<div class="tab-pane" id="applytransform">
<h3 class="fref_title">Applies the transformation function(s)</h3>
<h4>Description</h4>
This is called internally in the map phase of datadr MapReduce jobs. It is not meant for use outside of there, but is exported for convenience.
<h4>Usage</h4>
<pre><code class="language-r"><div>applyTransform(transFns, x, env = NULL)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>transFns</dt>
<dd>from the "transforms" attribute of a ddo object</dd>
<dt>x</dt>
<dd>a subset of the object</dd>
<dt>env</dt>
<dd>the environment in which to evaluate the function (should be instantiated from calling <code><a href='#setuptransformenv'>setupTransformEnv</a></code>) - if <code>NULL</code>, the environment will be set up for you</dd>
</dl>
</div>
<!-- as.data.frame.ddf -->
<div class="tab-pane" id="asdataframeddf">
<h3 class="fref_title">Turn 'ddf' Object into Data Frame</h3>
<h4>Description</h4>
Rbind all the rows of a 'ddf' object into a single data frame
<h4>Usage</h4>
<pre><code class="language-r"><div>"as.data.frame"(x, row.names = NULL, optional = FALSE, keys = TRUE, splitVars = TRUE, bsvs = FALSE, ...)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>a 'ddf' object</dd>
<dt>row.names</dt>
<dd>passed to <code>as.data.frame</code></dd>
<dt>optional</dt>
<dd>passed to <code>as.data.frame</code></dd>
<dt>keys</dt>
<dd>should the key be added as a variable in the resulting data frame? (if key is not a character, it will be replaced with a md5 hash)</dd>
<dt>splitVars</dt>
<dd>should the values of the splitVars be added as variables in the resulting data frame?</dd>
<dt>bsvs</dt>
<dd>should the values of bsvs be added as variables in the resulting data frame?</dd>
<dt>...</dt>
<dd>additional arguments passed to as.data.frame</dd>
</dl>
</div>
<!-- as.list.ddo -->
<div class="tab-pane" id="aslistddo">
<h3 class="fref_title">Turn 'ddo' / 'ddf' Object into a list</h3>
<h4>Description</h4>
Turn 'ddo' / 'ddf' Object into a list
<h4>Usage</h4>
<pre><code class="language-r"><div>"as.list"(x, ...)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>a 'ddo' / 'ddf' object</dd>
<dt>...</dt>
<dd>additional arguments passed to <code>as.list</code></dd>
</dl>
</div>
<!-- bsv -->
<div class="tab-pane" id="bsv">
<h3 class="fref_title">Construct Between Subset Variable (BSV)</h3>
<h4>Description</h4>
Construct between subset variable (BSV)
<h4>Usage</h4>
<pre><code class="language-r"><div>bsv(val = NULL, desc = "")</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>val</dt>
<dd>a scalar character, numeric, or date</dd>
<dt>desc</dt>
<dd>a character string describing the BSV</dd>
</dl>
<h4>Details</h4>
<p>Should be called inside the <code>bsvFn</code> argument to <code>divide</code> used for constructing a BSV list for each subset of a division.</p>
<h4>See also</h4>
<code><a href='#divide'>divide</a></code>, <code><a href='#getbsvs'>getBsvs</a></code>, <code><a href='ddo-ddf-#accessors'>bsvInfo</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- charFileHash -->
<div class="tab-pane" id="charfilehash">
<h3 class="fref_title">Character File Hash Function</h3>
<h4>Description</h4>
Function to be used to specify the file where key-value pairs get stored for local disk connections, useful when keys are scalar strings. Should be passed as the argument <code>fileHashFn</code> to <code><a href='localDiskConn.html'>localDiskConn</a></code>.
<h4>Usage</h4>
<pre><code class="language-r"><div>charFileHash(keys, conn)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>keys</dt>
<dd>keys to be hashed</dd>
<dt>conn</dt>
<dd>a "localDiskConn" object</dd>
</dl>
<h4>Details</h4>
<p>You shouldn't need to call this directly other than to experiment with what the output looks like or to get ideas on how to write your own custom hash.</p>
<h4>See also</h4>
<code>localDiskConn</code>, <code><a href='#digestfilehash'>digestFileHash</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- combCollect -->
<div class="tab-pane" id="combcollect">
<h3 class="fref_title">"Collect" Recombination</h3>
<h4>Description</h4>
"Collect" recombination - simply collect the results into a local list of key-value pairs
<h4>Usage</h4>
<pre><code class="language-r"><div>combCollect(...)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>...</dt>
<dd>...</dd>
</dl>
<h4>Details</h4>
<p>This is an experimental prototype. It is to be passed as the argument <code>combine</code> to <code><a href='#recombine'>recombine</a></code>.</p>
<h4>See also</h4>
<code><a href='#divide'>divide</a></code>, <code><a href='#recombine'>recombine</a></code>, <code><a href='#combddo'>combDdo</a></code>, <code><a href='#combmeancoef'>combMeanCoef</a></code>, <code><a href='#combrbind'>combRbind</a></code>, <code><a href='#combmean'>combMean</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- combDdo -->
<div class="tab-pane" id="combddo">
<h3 class="fref_title">"DDO" Recombination</h3>
<h4>Description</h4>
"DDO" recombination - simply collect the results into a "ddo" object
<h4>Usage</h4>
<pre><code class="language-r"><div>combDdo(...)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>...</dt>
<dd>...</dd>
</dl>
<h4>Details</h4>
<p>This is an experimental prototype. It is to be passed as the argument <code>combine</code> to <code><a href='#recombine'>recombine</a></code>.</p>
<h4>See also</h4>
<code><a href='#divide'>divide</a></code>, <code><a href='#recombine'>recombine</a></code>, <code><a href='#combcollect'>combCollect</a></code>, <code><a href='#combmeancoef'>combMeanCoef</a></code>, <code><a href='#combrbind'>combRbind</a></code>, <code><a href='#combmean'>combMean</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- combMean -->
<div class="tab-pane" id="combmean">
<h3 class="fref_title">Mean Recombination</h3>
<h4>Description</h4>
Mean recombination
<h4>Usage</h4>
<pre><code class="language-r"><div>combMean(...)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>...</dt>
<dd>...</dd>
</dl>
<h4>Details</h4>
<p>This is an experimental prototype. It is to be passed as the argument <code>combine</code> to <code><a href='#recombine'>recombine</a></code>.</p>
<h4>See also</h4>
<code><a href='#divide'>divide</a></code>, <code><a href='#recombine'>recombine</a></code>, <code><a href='#combcollect'>combCollect</a></code>, <code><a href='#combddo'>combDdo</a></code>, <code><a href='#combrbind'>combRbind</a></code>, <code><a href='#combmeancoef'>combMeanCoef</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- combMeanCoef -->
<div class="tab-pane" id="combmeancoef">
<h3 class="fref_title">Mean Coefficient Recombination</h3>
<h4>Description</h4>
Mean coefficient recombination
<h4>Usage</h4>
<pre><code class="language-r"><div>combMeanCoef(...)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>...</dt>
<dd>...</dd>
</dl>
<h4>Details</h4>
<p>This is an experimental prototype. It is to be passed as the argument <code>combine</code> to <code><a href='#recombine'>recombine</a></code>. It expects to be dealing with named vectors including an element <code>n</code> specifying the number of rows in that subset.</p>
<h4>See also</h4>
<code><a href='#divide'>divide</a></code>, <code><a href='#recombine'>recombine</a></code>, <code><a href='#rrdiv'>rrDiv</a></code>, <code><a href='#combcollect'>combCollect</a></code>, <code><a href='#combddo'>combDdo</a></code>, <code><a href='#combrbind'>combRbind</a></code>, <code><a href='#combmean'>combMean</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- combRbind -->
<div class="tab-pane" id="combrbind">
<h3 class="fref_title">"rbind" Recombination</h3>
<h4>Description</h4>
"rbind" recombination
<h4>Usage</h4>
<pre><code class="language-r"><div>combRbind(...)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>...</dt>
<dd>...</dd>
</dl>
<h4>Details</h4>
<p>This is an experimental prototype. It is to be passed as the argument <code>combine</code> to <code><a href='#recombine'>recombine</a></code>.</p>
<h4>See also</h4>
<code><a href='#divide'>divide</a></code>, <code><a href='#recombine'>recombine</a></code>, <code><a href='#combddo'>combDdo</a></code>, <code><a href='#combcollect'>combCollect</a></code>, <code><a href='#combmeancoef'>combMeanCoef</a></code>, <code><a href='#combmean'>combMean</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- condDiv -->
<div class="tab-pane" id="conddiv">
<h3 class="fref_title">Conditioning Variable Division</h3>
<h4>Description</h4>
Specify conditioning variable division parameters for data division
<h4>Usage</h4>
<pre><code class="language-r"><div>condDiv(vars)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>vars</dt>
<dd>a character string or vector of character strings specifying the variables of the input data across which to divide</dd>
</dl>
<h4>Value</h4>
<p>a list to be used for the "by" argument to <code><a href='#divide'>divide</a></code></p>
<h4>Details</h4>
<p>Currently each unique combination of values of <code>vars</code> constitutes a subset. In the future, specifying shingles for numeric conditioning variables will be implemented.</p>
<h4>References</h4>
<p><ul>
<li> <a href = 'http://www.datadr.org'>http://www.datadr.org</a>
</li>
<li> <a href = 'http://onlinelibrary.wiley.com/doi/10.1002/sta4.7/full'>Guha, S., Hafen, R., Rounds, J., Xia, J., Li, J., Xi, B., & Cleveland, W. S. (2012). Large complex data: divide and recombine (D&R) with RHIPE. <em>Stat</em>, 1(1), 53-67.</a>
</li>
</ul></p>
<p></p>
<h4>See also</h4>
<code><a href='#divide'>divide</a></code>, <code><a href='#getsplitvars'>getSplitVars</a></code>, <code><a href='#getsplitvar'>getSplitVar</a></code>
<h4>Author</h4>
Ryan Hafen
</div>
<!-- convert -->
<div class="tab-pane" id="convert">
<h3 class="fref_title">Convert 'ddo' / 'ddf' Objects</h3>
<h4>Description</h4>
Convert 'ddo' / 'ddf' objects between different storage backends
<h4>Usage</h4>
<pre><code class="language-r"><div>convert(from, to)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>from</dt>
<dd>a 'ddo' or 'ddf' object</dd>
<dt>to</dt>
<dd>a 'kvConnection' object (created with <code><a href='#localdiskconn'>localDiskConn</a></code> or <code><a href='#hdfsconn'>hdfsConn</a></code>) or <code>NULL</code> if an in-memory 'ddo' / 'ddf' is desired</dd>
</dl>
</div>
<!-- datadr -->
<div class="tab-pane" id="datadr">
<h3 class="fref_title">datadr.</h3>
<h4>Description</h4>
datadr.
</div>
<!-- ddf-class -->
<div class="tab-pane" id="ddf-class">
<h3 class="fref_title">'ddf' accessors</h3>
<h4>Description</h4>
'ddf' accessors,'ddf' accessors,'ddf' accessors,'ddf' accessors,The Number of Rows/Columns of a 'ddf' object
<h4>Usage</h4>
<pre><code class="language-r"><div>nrow(x)</div>
<div>NROW(x)</div>
<div>ncol(x)</div>
<div>NCOL(x)</div>
<div>"nrow"(x)</div>
<div>"NROW"(x)</div>
<div>"ncol"(x)</div>
<div>"NCOL"(x)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>a 'ddf' object</dd>
</dl>
</div>
<!-- ddf -->
<div class="tab-pane" id="ddf">
<h3 class="fref_title">Instantiate a Distributed Data Frame ('ddf')</h3>
<h4>Description</h4>
Instantiate a distributed data frame ('ddf')
<h4>Usage</h4>
<pre><code class="language-r"><div>ddf(conn, transFn = NULL, update = FALSE, reset = FALSE, control = NULL, verbose = TRUE)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>conn</dt>
<dd>an object pointing to where data is or will be stored for the 'ddf' object - can be a 'kvConnection' object created from <code><a href='#localdiskconn'>localDiskConn</a></code> or <code><a href='#hdfsconn'>hdfsConn</a></code>, or a data frame or list of key-value pairs</dd>
<dt>transFn</dt>
<dd>transFn a function to be applied to the key-value pairs of this data prior to doing any processing, that transform the data into a data frame if it is not stored as such</dd>
<dt>update</dt>
<dd>should the attributes of this object be updated? See <code><a href='#updateattributes'>updateAttributes</a></code> for more details.</dd>
<dt>reset</dt>
<dd>should all persistent metadata about this object be removed and the object created from scratch? This setting does not effect data stored in the connection location.</dd>
<dt>control</dt>
<dd>parameters specifying how the backend should handle things if attributes are updated (most-likely parameters to <code>rhwatch</code> in RHIPE) - see <code><a href='#rhipecontrol'>rhipeControl</a></code> and <code><a href='#localdiskcontrol'>localDiskControl</a></code></dd>
<dt>verbose</dt>
<dd>logical - print messages about what is being done</dd>
</dl>
</div>
<!-- kvExample -->
<div class="tab-pane" id="kvexample">
<h3 class="fref_title">Accessor Functions</h3>
<h4>Description</h4>
Accessor functions for attributes of ddo/ddf objects. Methods also include <code>nrow</code> and <code>ncol</code> for ddf objects.,Accessor methods for 'ddo' and 'ddf' objects
<h4>Usage</h4>
<pre><code class="language-r"><div>kvExample(x)</div>
<div>bsvInfo(x)</div>
<div>counters(x)</div>
<div>splitSizeDistn(x)</div>
<div>splitRowDistn(x)</div>
<div>getKeys(x)</div>
<div>"summary"(object, ...)</div>
<div>"summary"(object, ...)</div>
<div>hasExtractableKV(x)</div>
<div>"names"(x)</div>
<div>"length"(x)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>x</dt>
<dd>a 'ddf'/'ddo' object</dd>
<dt>object</dt>
<dd>a 'ddf'/'ddo' object</dd>
<dt>...</dt>
<dd>additional arguments</dd>
</dl>
</div>
<!-- ddo -->
<div class="tab-pane" id="ddo">
<h3 class="fref_title">Instantiate a Distributed Data Object ('ddo')</h3>
<h4>Description</h4>
Instantiate a distributed data object ('ddo')
<h4>Usage</h4>
<pre><code class="language-r"><div>ddo(conn, update = FALSE, reset = FALSE, control = NULL, verbose = TRUE)</div></code></pre>
<h4>Arguments</h4>
<dl>
<dt>conn</dt>
<dd>an object pointing to where data is or will be stored for the 'ddf' object - can be a 'kvConnection' object created from <code><a href='#localdiskconn'>localDiskConn</a></code> or <code><a href='#hdfsconn'>hdfsConn</a></code>, or a data frame or list of key-value pairs</dd>
<dt>update</dt>
<dd>should the attributes of this object be updated? See <code><a href='#updateattributes'>updateAttributes</a></code> for more details.</dd>
<dt>reset</dt>
<dd>should all persistent metadata about this object be removed and the object created from scratch? This setting does not effect data stored in the connection location.</dd>
<dt>control</dt>
<dd>parameters specifying how the backend should handle things if attributes are updated (most-likely parameters to <code>rhwatch</code> in RHIPE) - see <code><a href='#rhipecontrol'>rhipeControl</a></code> and <code><a href='#localdiskcontrol'>localDiskControl</a></code></dd>
<dt>verbose</dt>
<dd>logical - print messages about what is being done</dd>
</dl>
</div>
<!-- setAttributes -->
<div class="tab-pane" id="setattributes">
<h3 class="fref_title">Managing attributes of 'ddo' or 'ddf' objects</h3>
<h4>Description</h4>
Managing attributes of 'ddo' or 'ddf' objects
<h4>Usage</h4>
<pre><code class="language-r"><div>setAttributes(obj, attrs)</div>
<div>"setAttributes"(obj, attrs)</div>
<div>"setAttributes"(obj, attrs)</div>
<div>getAttribute(obj, attrName)</div>
<div>getAttributes(obj, attrNames)</div>
<div>"getAttributes"(obj, attrNames)</div>
<div>"getAttributes"(obj, attrNames)</div>
<div>hasAttributes(obj, ...)</div>
<div>"hasAttributes"(obj, attrNames)</div></code></pre>