Description Usage Arguments Value Examples
StructField
1 2 3 4 5 6 7 | StructField(x, ...)
## S3 method for class 'jobj'
StructField(x, ...)
## S3 method for class 'character'
StructField(x, type, nullable = TRUE, ...)
|
x |
the name of the field. |
... |
additional argument(s) passed to the method. |
type |
The data type of the field, see https://spark.apache.org/docs/latest/sparkr.html#data-type-mapping-between-r-and-spark |
nullable |
boolean, whether or not the field is nullable |
a StructField object
1 2 3 4 5 6 7 8 | ## Not run:
schema <- StructType(
StructField("a", "integer"),
StructField("c", "string"),
StructField("avg", "double")
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.