friendly_type_of: Return English-friendly messaging for object-types

View source: R/compat_friendly_type.R

friendly_type_ofR Documentation

Return English-friendly messaging for object-types

Description

Return English-friendly messaging for object-types

Usage

friendly_type_of(x, value = TRUE, length = FALSE)

Arguments

x

Any R object.

Default value

none

value

Whether to describe the value of x.

Default value

TRUE

length

Whether to mention the length of vectors and lists.

Default value

FALSE

Details

This helper function aids us in forming user-friendly messages that gets called through what_is_it(), which is often used in the assertion functions to identify what object-type the user passed through an argument instead of an expected-type.

Value

A string describing the type. Starts with an indefinite article, e.g. "an integer vector".

See Also

Developer Utility Functions: %notin%(), %or%(), arg_name(), contains_vars(), convert_dtm_to_dtc(), extract_vars(), filter_if(), valid_time_units(), vars2chr()


admiraldev documentation built on June 26, 2025, 1:09 a.m.