h2o.substring: Substring

Description Usage Arguments Examples

Description

Returns a copy of the target column that is a substring at the specified start and stop indices, inclusive. If the stop index is not specified, then the substring extends to the end of the original string. If start is longer than the number of characters in the original string, or is greater than stop, an empty string is returned. Negative start is coerced to 0.

Usage

1
2
3
h2o.substring(x, start, stop = "[]")

h2o.substr(x, start, stop = "[]")

Arguments

x

The column on which to operate.

start

The index of the first element to be included in the substring.

stop

Optional, The index of the last element to be included in the substring.

Examples

1
2
3
4
library(h2o)
h2o.init()
string_to_substring <- as.h2o("1234567890")
substr <- h2o.substring(string_to_substring,2) #Get substring from second index onwards


Search within the h2o package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.