Skip to content
This repository
Browse code

provide defaults #19

  • Loading branch information...
commit 08f49bc951928bb4a3d5e493f52948986202496c 1 parent 8d310b3
Antonio Piccolboni authored November 30, 2012
8  rmr2/pkg/R/IO.R
@@ -299,10 +299,10 @@ make.input.format =
299 299
           optlist = list(...)
300 300
           format = 
301 301
             make.hbase.input.format(
302  
-              optlist$dense,
303  
-              optlist$atomic,
304  
-              optlist$key.deserialize,
305  
-              optlist$cell.deserialize)
  302
+              default(optlist$dense, F),
  303
+              default(optlist$atomic, F),
  304
+              default(optlist$key.deserialize, "raw"),
  305
+              default(optlist$cell.deserialize, "raw"))
306 306
           mode = "binary"
307 307
           streaming.format = 
308 308
             "com.dappervision.hbase.mapred.TypedBytesTableInputFormat"
3  rmr2/pkg/R/basic.R
@@ -16,6 +16,9 @@
16 16
 
17 17
 qw = function(...) as.character(match.call())[-1]
18 18
 
  19
+#assignment
  20
+
  21
+default = function(x, value) if(!is.null(x)) x else value
19 22
 
20 23
 #functional
21 24
 

0 notes on commit 08f49bc

Please sign in to comment.
Something went wrong with that request. Please try again.