Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

new_partial

Partial type


Description

[Experimental]

Use new_partial() when constructing a new partial type subclass; and use is_partial() to test if a type is partial. All subclasses need to provide a vec_ptype_finalise() method.

Usage

new_partial(..., class = character())

is_partial(x)

vec_ptype_finalise(x, ...)

Arguments

...

Attributes of the partial type

class

Name of subclass.

Details

As the name suggests, a partial type partially specifies a type, and it must be combined with data to yield a full type. A useful example of a partial type is partial_frame(), which makes it possible to specify the type of just a few columns in a data frame. Use this constructor if you're making your own partial type.


vctrs

Vector Helpers

v0.3.8
MIT + file LICENSE
Authors
Hadley Wickham [aut], Lionel Henry [aut, cre], Davis Vaughan [aut], data.table team [cph] (Radix sort based on data.table's forder() and their contribution to R's order()), RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.