Permalink
Browse files

provide defaults #19

  • Loading branch information...
1 parent 8d310b3 commit 08f49bc951928bb4a3d5e493f52948986202496c @piccolbo piccolbo committed Nov 30, 2012
Showing with 7 additions and 4 deletions.
  1. +4 −4 rmr2/pkg/R/IO.R
  2. +3 −0 rmr2/pkg/R/basic.R
View
8 rmr2/pkg/R/IO.R
@@ -299,10 +299,10 @@ make.input.format =
optlist = list(...)
format =
make.hbase.input.format(
- optlist$dense,
- optlist$atomic,
- optlist$key.deserialize,
- optlist$cell.deserialize)
+ default(optlist$dense, F),
+ default(optlist$atomic, F),
+ default(optlist$key.deserialize, "raw"),
+ default(optlist$cell.deserialize, "raw"))
mode = "binary"
streaming.format =
"com.dappervision.hbase.mapred.TypedBytesTableInputFormat"
View
3 rmr2/pkg/R/basic.R
@@ -16,6 +16,9 @@
qw = function(...) as.character(match.call())[-1]
+#assignment
+
+default = function(x, value) if(!is.null(x)) x else value
#functional

0 comments on commit 08f49bc

Please sign in to comment.