Skip to contents

For a package that makes tables of data of another form, such as a file.

Usage

.table_type(type)

Arguments

type

An R8 table type, or a type_table().

Value

List: columns, a data frame with the variables name, kind ("logical", "integer", "double", "character", "date", "posixct", or "factor"), optional, whether cells may be missing, required, whether a table has the column, and the list levels; types, the field types by name; and open, whether a table has other columns. NULL for an object that is no table type.

Examples

.table_type(type_table(list(age = type_double(), sex = type_factor(c("f", "m")))))
#> $columns
#>   name   kind optional required levels
#> 1  age double    FALSE     TRUE       
#> 2  sex factor    FALSE     TRUE   f, m
#> 
#> $types
#> $types$age
#> <r8 field type> double
#> 
#> $types$sex
#> <r8 field type> factor {"f", "m"}
#> 
#> 
#> $open
#> [1] FALSE
#>