Given data source and headers infer will return a Table Schema based on the data values.
infer(source, options = list())
source | data source, one of:
|
---|---|
options | any |
Schema descriptor
# list of lists data source source = list( list("id"= 1, "age"= 39, "name"= "Paul"), list("id"= 2, "age"= 23, "name"= "Jimmy"), list("id"= 3, "age"= 36, "name"= "Jane"), list("id"= 4, "age"= 28, "name"= "Judy")) infer(source, options=list(headers=list("id","age","name")))$fields#> [[1]] #> [[1]]$name #> [1] "id" #> #> [[1]]$type #> [1] "integer" #> #> [[1]]$format #> [1] "default" #> #> #> [[2]] #> [[2]]$name #> [1] "age" #> #> [[2]]$type #> [1] "integer" #> #> [[2]]$format #> [1] "default" #> #> #> [[3]] #> [[3]]$name #> [1] "name" #> #> [[3]]$type #> [1] "string" #> #> [[3]]$format #> [1] "default" #> #>