| na_type {nanoarrow} | R Documentation | 
Create type objects
Description
In nanoarrow, types, fields, and schemas are all represented by a
nanoarrow_schema. These functions are convenience
constructors to create these objects in a readable way. Use na_type() to
construct types based on the constructor name, which is also the name that
prints/is returned by nanoarrow_schema_parse().
Usage
na_type(
  type_name,
  byte_width = NULL,
  unit = NULL,
  timezone = NULL,
  column_types = NULL,
  item_type = NULL,
  key_type = NULL,
  value_type = NULL,
  index_type = NULL,
  ordered = NULL,
  list_size = NULL,
  keys_sorted = NULL,
  storage_type = NULL,
  extension_name = NULL,
  extension_metadata = NULL,
  nullable = NULL
)
na_na(nullable = TRUE)
na_bool(nullable = TRUE)
na_int8(nullable = TRUE)
na_uint8(nullable = TRUE)
na_int16(nullable = TRUE)
na_uint16(nullable = TRUE)
na_int32(nullable = TRUE)
na_uint32(nullable = TRUE)
na_int64(nullable = TRUE)
na_uint64(nullable = TRUE)
na_half_float(nullable = TRUE)
na_float(nullable = TRUE)
na_double(nullable = TRUE)
na_string(nullable = TRUE)
na_large_string(nullable = TRUE)
na_binary(nullable = TRUE)
na_large_binary(nullable = TRUE)
na_fixed_size_binary(byte_width, nullable = TRUE)
na_date32(nullable = TRUE)
na_date64(nullable = TRUE)
na_time32(unit = c("ms", "s"), nullable = TRUE)
na_time64(unit = c("us", "ns"), nullable = TRUE)
na_duration(unit = c("ms", "s", "us", "ns"), nullable = TRUE)
na_interval_months(nullable = TRUE)
na_interval_day_time(nullable = TRUE)
na_interval_month_day_nano(nullable = TRUE)
na_timestamp(unit = c("us", "ns", "s", "ms"), timezone = "", nullable = TRUE)
na_decimal128(precision, scale, nullable = TRUE)
na_decimal256(precision, scale, nullable = TRUE)
na_struct(column_types = list(), nullable = FALSE)
na_sparse_union(column_types = list())
na_dense_union(column_types = list())
na_list(item_type, nullable = TRUE)
na_large_list(item_type, nullable = TRUE)
na_fixed_size_list(item_type, list_size, nullable = TRUE)
na_map(key_type, item_type, keys_sorted = FALSE, nullable = TRUE)
na_dictionary(value_type, index_type = na_int32(), ordered = FALSE)
na_extension(storage_type, extension_name, extension_metadata = "")
Arguments
type_name | 
 The name of the type (e.g., "int32"). This form of the constructor is useful for writing tests that loop over many types.  | 
byte_width | 
 For   | 
unit | 
 One of 's' (seconds), 'ms' (milliseconds), 'us' (microseconds), or 'ns' (nanoseconds).  | 
timezone | 
 A string representing a timezone name. The empty string "" represents a naive point in time (i.e., one that has no associated timezone).  | 
column_types | 
 A   | 
item_type | 
 For   | 
key_type | 
 The nanoarrow_schema representing the
  | 
value_type | 
 The nanoarrow_schema representing the
  | 
index_type | 
 The nanoarrow_schema representing the
  | 
ordered | 
 Use   | 
list_size | 
 The number of elements in each item in a
  | 
keys_sorted | 
 Use   | 
storage_type | 
 For   | 
extension_name | 
 For   | 
extension_metadata | 
 A string or raw vector defining extension metadata. Most Arrow extension types define extension metadata as a JSON object.  | 
nullable | 
 Use   | 
precision | 
 The total number of digits representable by the decimal type  | 
scale | 
 The number of digits after the decimal point in a decimal type  | 
Value
Examples
na_int32()
na_struct(list(col1 = na_int32()))