summaryrefslogblamecommitdiff
path: root/site/docs/1.5.0/api/R/schema.html
blob: 6b0b3a95d0836dc125f024671c8e369f7ef8822c (plain) (tree)



























































                                                                                                                                                                                                 
<!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: Get schema object</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 schema {SparkR}"><tr><td>schema {SparkR}</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Get schema object</h2>

<h3>Description</h3>

<p>Returns the schema of this DataFrame as a structType object.
</p>


<h3>Usage</h3>

<pre>
## S4 method for signature 'DataFrame'
schema(x)

columns(x)

dtypes(x)

printSchema(x)

schema(x)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>x</code></td>
<td>
<p>A SparkSQL DataFrame</p>
</td></tr>
</table>


<h3>Examples</h3>

<pre><code class="r">## Not run: 
##D sc &lt;- sparkR.init()
##D sqlContext &lt;- sparkRSQL.init(sc)
##D path &lt;- &quot;path/to/file.json&quot;
##D df &lt;- jsonFile(sqlContext, path)
##D dfSchema &lt;- schema(df)
## End(Not run)
</code></pre>


<hr /><div style="text-align: center;">[Package <em>SparkR</em> version 1.5.0 <a href="00Index.html">Index</a>]</div>
</body></html>