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

faq-error-incompatible-attributes

FAQ - Error/Warning: Some attributes are incompatible


Description

This error occurs when vec_ptype2() or vec_cast() are supplied vectors of the same classes with different attributes. In this case, vctrs doesn't know how to combine the inputs.

To fix this error, the maintainer of the class should implement self-to-self coercion methods for vec_ptype2() and vec_cast().

Implementing coercion methods

  • For an overview of how these generics work and their roles in vctrs, see ?theory-faq-coercion.

  • For an example of implementing coercion methods for simple vectors, see ?howto-faq-coercion.

  • For an example of implementing coercion methods for data frame subclasses, see ?howto-faq-coercion-data-frame.

  • For a tutorial about implementing vctrs classes from scratch, see vignette("s3-vector").


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.