How do I build an object with the R vctrs package that can combine with c()
问题 I'm trying to understand how to build objects with vectors. I thought this was straightforwards, but then had trouble when I used c() on my object. Our object has two attributes, x and descriptor, both strings in this case (my object will have attributes with differing types). We've built a constructor, new_toy_vector. I haven't built a convenience function in this example yet. new_toy_vector <- function( x = character(), descriptor = character()) { vctrs::vec_assert(x,character()) vctrs::vec