Description Usage Arguments Value Examples
Create a StructType object that contains the metadata for a SparkDataFrame. Intended for use with read functions and apply functions.
1 2 3 4 5 6 7 8 9 10 11 12 13 | StructType(x, ...)
## S3 method for class 'jobj'
StructType(x, ...)
## S3 method for class 'character'
StructType(x, ...)
## S3 method for class 'StructField'
StructType(x, ...)
## S3 method for class 'StructType'
StructType(x, ...)
|
x |
a StructField object (created with the StructField method). Since Spark 2.3, this can be a DDL-formatted string, which is a comma separated list of field definitions, e.g., "a INT, b STRING". |
... |
additional StructField objects |
an object of type StructType
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.