substr.Rd
An expression that returns a substring.
# S4 method for Column substr(x, start, stop)
a Column.
starting position. It should be 1-base.
ending position.
substr since 1.4.0
Other column_func: alias(), between(), cast(), endsWith(), otherwise(), over(), startsWith()
alias()
between()
cast()
endsWith()
otherwise()
over()
startsWith()
if (FALSE) { df <- createDataFrame(list(list(a="abcdef"))) collect(select(df, substr(df$a, 1, 4))) # the result is `abcd`. collect(select(df, substr(df$a, 2, 4))) # the result is `bcd`. }