Skip to contents

The single coercion rule shared by the live JSON path (coerce_types()) and the bulk path (rename_and_coerce()), so a dictionary type is invariant across sources. A value that is present (not NA, not empty) but does not parse is a failure; its index is returned so the caller can build the brreg_parse_problems table. A list-column (a nested array of objects) is returned unchanged: the dictionary types describe scalar cells only.

Usage

coerce_column(x, type)

Arguments

x

A vector.

type

One of the field_dict types.

Value

A list with value (the coerced vector) and failed (integer indices of unparseable values).