Permalink
Browse files

use make.input.format() to wrap asa.csvtextinputformat() -- I had mis…

…sed that it was that easy
  • Loading branch information...
Jeffrey Breen
Jeffrey Breen committed Mar 11, 2012
1 parent 3be4136 commit f274f52e934d25d70a7ef7b146439634e7ad4837
Showing with 3 additions and 5 deletions.
  1. +3 −5 R/functions.R
View
@@ -10,9 +10,9 @@ csvtextinputformat = list(mode = 'text', format = function(line) {
#
# based on jseidman's cvstextinputformat
# 1. added field names for better code readability (esp. in mapper)
-# 2. wrapped in list() for rmr-1.2's new I/O model
+# 2. use make.input.format() to wrap for rmr-1.2's new I/O model
#
-asa.csvtextinputformat = list(mode = 'text', format = function(line) {
+asa.csvtextinputformat = make.input.format( format = function(line) {
values = unlist( strsplit(line, "\\,") )
@@ -24,9 +24,7 @@ asa.csvtextinputformat = list(mode = 'text', format = function(line) {
'WeatherDelay','NASDelay','SecurityDelay','LateAircraftDelay')
return( keyval(NULL, values) )
-
-}, streaming.format=NULL)
-
+} )
#
# the mapper gets a key and a value vector generated by the formatter

0 comments on commit f274f52

Please sign in to comment.