Learn R Programming

h2o (version 2.8.4.4)

h2o.parseRaw: Parse Raw Data File

Description

Parses a raw data file, returning an object containing the identifying hex key.

Usage

h2o.parseRaw(data, key = "", header, header_with_hash, sep = "", col.names,
             parser_type="AUTO")

Arguments

data
An H2ORawData object to be parsed.
key
(Optional) The hex key assigned to the parsed file.
header
(Optional) A logical value indicating whether the first row is the column header. If missing, H2O will automatically try to detect the presence of a header.
header_with_hash
(Optional) A logical value indicating whether the first row is a column header that begins with a hash character. If missing, H2O will automatically try to detect the presence of a header.
sep
(Optional) The field separator character. Values on each line of the file are separated by this character. If sep = "", the parser will automatically detect the separator.
col.names
(Optional) A H2OParsedData object containing a single delimited line with the column names for the file.
parser_type
(Optional) Specify the type of data to be parsed. parser_type = "AUTO" is the default, other acceptable values are "SVMLight", "XLS", and "CSV".

Value

  • An object of class H2OParsedData, representing the dataset that was parsed.

Details

After the raw data file is parsed, it will be automatically deleted from the H2O server.

See Also

h2o.importFile, h2o.importFolder, h2o.importHDFS, h2o.importURL, h2o.uploadFile

Examples

Run this code
library(h2o)
localH2O = h2o.init()
prosPath = system.file("extdata", "prostate.csv", package="h2o")
prostate.raw = h2o.importFile(localH2O, path = prosPath, parse = FALSE)
# Do not modify prostate.csv on disk at this point!
prostate.hex = h2o.parseRaw(data = prostate.raw, key = "prostate.hex")
# After parsing, it is okay to modify or delete prostate.csv

Run the code above in your browser using DataLab