dot-coerce_to.aidR: Coerce a vector to a target atomic type

.coerce_to.aidRR Documentation

Coerce a vector to a target atomic type

Description

Wrapper around the as.* functions, dispatching on a target type name as returned by .most_general_class.aidR. An unrecognised target leaves the vector unchanged.

Usage

.coerce_to.aidR(x, target)

Arguments

x

A vector to coerce.

target

Length-one character string naming the target type: one of "logical", "integer", "numeric" or "character".

Value

x coerced to target, or x unchanged if target is not recognised.


aidR documentation built on Oct. 28, 2026, 5:13 p.m.