vec_ptype_full

0th

Percentile

Vector type as a string

vec_ptype_full() displays the full type of the vector. vec_ptype_abbr() provides an abbreviated summary suitable for use in a column heading.

Keywords
internal
Usage
vec_ptype_full(x)

vec_ptype_abbr(x)

Arguments
x

A vector.

Value

A string.

S3 dispatch

The default method for vec_ptype_full() uses the first element of the class vector. Override this method if your class has parameters that should be prominently displayed.

The default method for vec_ptype_abbr() abbreviate()s vec_ptype_full() to 8 characters. You should almost always override, aiming for 4-6 characters where possible.

Aliases
  • vec_ptype_full
  • vec_ptype_abbr
Examples
# NOT RUN {
cat(vec_ptype_full(1:10))
cat(vec_ptype_full(iris))

cat(vec_ptype_abbr(1:10))
# }
Documentation reproduced from package vctrs, version 0.1.0, License: GPL-3

Community examples

Looks like there are no examples yet.