Learn R Programming

vctrs (version 0.7.0)

list-of-attributes: list_of attributes

Description

  • list_of_ptype() returns the ptype required by the list_of. If no ptype is required, then NULL is returned.

  • list_of_size() returns the size required by the list_of. If no size is required, then NULL is returned.

Usage

list_of_ptype(x)

list_of_size(x)

Arguments

x

A list_of.

Examples

Run this code
x <- list_of(1, 2)
list_of_ptype(x)
list_of_size(x)

x <- list_of(.ptype = integer(), .size = 5)
list_of_ptype(x)
list_of_size(x)

Run the code above in your browser using DataLab