| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: substr</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| <link rel="stylesheet" type="text/css" href="R.css" /> |
| |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/github.min.css"> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script> |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/languages/r.min.js"></script> |
| <script>hljs.initHighlightingOnLoad();</script> |
| </head><body> |
| |
| <table width="100%" summary="page for substr {SparkR}"><tr><td>substr {SparkR}</td><td style="text-align: right;">R Documentation</td></tr></table> |
| |
| <h2>substr</h2> |
| |
| <h3>Description</h3> |
| |
| <p>An expression that returns a substring. |
| </p> |
| |
| |
| <h3>Usage</h3> |
| |
| <pre> |
| ## S4 method for signature 'Column' |
| substr(x, start, stop) |
| </pre> |
| |
| |
| <h3>Arguments</h3> |
| |
| <table summary="R argblock"> |
| <tr valign="top"><td><code>x</code></td> |
| <td> |
| <p>a Column.</p> |
| </td></tr> |
| <tr valign="top"><td><code>start</code></td> |
| <td> |
| <p>starting position. It should be 1-base.</p> |
| </td></tr> |
| <tr valign="top"><td><code>stop</code></td> |
| <td> |
| <p>ending position.</p> |
| </td></tr> |
| </table> |
| |
| |
| <h3>Note</h3> |
| |
| <p>substr since 1.4.0 |
| </p> |
| |
| |
| <h3>See Also</h3> |
| |
| <p>Other colum_func: <code><a href="alias.html">alias</a></code>, |
| <code><a href="between.html">between</a></code>, <code><a href="cast.html">cast</a></code>, |
| <code><a href="endsWith.html">endsWith</a></code>, <code><a href="otherwise.html">otherwise</a></code>, |
| <code><a href="over.html">over</a></code>, <code><a href="startsWith.html">startsWith</a></code> |
| </p> |
| |
| |
| <h3>Examples</h3> |
| |
| <pre><code class="r">## Not run: |
| ##D df <- createDataFrame(list(list(a="abcdef"))) |
| ##D collect(select(df, substr(df$a, 1, 4))) # the result is `abcd`. |
| ##D collect(select(df, substr(df$a, 2, 4))) # the result is `bcd`. |
| ## End(Not run) |
| </code></pre> |
| |
| |
| <hr /><div style="text-align: center;">[Package <em>SparkR</em> version 2.3.2 <a href="00Index.html">Index</a>]</div> |
| </body></html> |