StructField: StructField

Description Usage Arguments Value Examples

Description

StructField

Usage

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, ...)

Arguments

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

Value

a StructField object

Examples

1
2
3
4
5
6
7
8
## Not run: 
schema <- StructType(
  StructField("a", "integer"),
  StructField("c", "string"),
  StructField("avg", "double")
  )

## End(Not run)

danzafar/tidyspark documentation built on Sept. 30, 2020, 12:19 p.m.