Create a structField object that contains the metadata for a single field in a schema.
UsagestructField(x, ...)
# S3 method for class 'jobj'
structField(x, ...)
# S3 method for class 'character'
structField(x, type, nullable = TRUE, ...)
Arguments
the name of the field.
additional argument(s) passed to the method.
The data type of the field
A logical vector indicating whether or not the field is nullable
A structField object.
NotestructField since 1.4.0
Examplesif (FALSE) { # \dontrun{
field1 <- structField("a", "integer")
field2 <- structField("c", "string")
field3 <- structField("avg", "double")
schema <- structType(field1, field2, field3)
df1 <- gapply(df, list("a", "c"),
function(key, x) { y <- data.frame(key, mean(x$b), stringsAsFactors = FALSE) },
schema)
} # }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4