Learn R Programming

h2o (version 2.8.4.4)

strsplit.H2OParsedData: Split the Elements of a Character Vector

Description

strsplit.H2OParsedData, a method for the strsplit base method. Obtain and returns an H2OParsedData object.

Usage

## S3 method for class 'H2OParsedData':
strsplit(x, split, fixed, perl, useBytes)

Arguments

x
An H2OParsedData object with a single factor column.
split
A non-empty string. Can be a regular expression.
fixed
Used by the base method. Ignored by H2OParsedData strsplit.
perl
Used by the base method. Ignored by H2OParsedData strsplit.
useBytes
Used by the base method. Ignored by H2OParsedData strsplit.

Value

  • An object of class "H2OParsedData".

Details

Splits the given factor column on the input split. If split is '', then an error will be thrown. The default is to split on whitespace.

Examples

Run this code
library(h2o)
localH2O <- h2o.init(ip = "localhost", port = 54321, startH2O = TRUE)
df <- data.frame(
    V1 = c("hello world", "the dog ate", "my friend Bob Ace", "meow meow"),
    V2 = c(92318, 34891.123, 21,99))
hex <- as.h2o(localH2O, df)
strsplit(hex$V1)  # split on ' '

Run the code above in your browser using DataLab