new_parser_block {blockr.core} | R Documentation |
Parser block constructors
Description
Operating on results from blocks created via new_file_block()
, parser
blocks read (i.e. "parse") a file and make the contents available to
subsequent blocks for further analysis and visualization.
Usage
new_parser_block(
server,
ui,
class,
ctor = sys.parent(),
dat_valid = is_file,
...
)
new_csv_block(sep = ",", quote = "\"", ...)
Arguments
server |
A function returning |
ui |
A function with a single argument ( |
class |
Block subclass |
ctor |
String-valued constructor name or function/frame number (mostly for internal use or when defining constructors for virtual classes) |
dat_valid |
(Optional) input data validator |
... |
Forwarded to |
sep , quote |
Forwarded to |
Details
If using the default validator for a parser block sub-class (i.e. not
overriding the dat_valid
argument in the call to new_parser_block()
),
the data argument corresponding to the input file name must be file
in
order to match naming conventions in the validator function.
Value
All blocks constructed via new_parser_block()
inherit from
parser_block
.
CSV block
Files in CSV format provided for example by a block created via
new_file_block()
may be parsed into data.frame
by CSV blocks.