search for: vec_type2

Displaying 9 results from an estimated 9 matches for "vec_type2".

Did you mean: vec_type
2018 Aug 06
2
vctrs: a type system for the tidyverse
...k these are good principles because they makes types simpler to understand and to implement. Method dispatch for `vec_c()` is quite simple because associativity and commutativity mean that we can determine the output type only by considering a pair of inputs at a time. To this end, vctrs provides `vec_type2()` which takes two inputs and returns their common type (represented as zero length vector): str(vec_type2(integer(), double())) #> num(0) str(vec_type2(factor("a"), factor("b"))) #> Factor w/ 2 levels "a","b": # NB: not all typ...
2018 Aug 06
3
vctrs: a type system for the tidyverse
...simpler to understand and to >> implement. >> >> Method dispatch for `vec_c()` is quite simple because associativity and >> commutativity mean that we can determine the output type only by >> considering a pair of inputs at a time. To this end, vctrs provides >> `vec_type2()` which takes two inputs and returns their common type >> (represented as zero length vector): >> >> str(vec_type2(integer(), double())) >> #> num(0) >> >> str(vec_type2(factor("a"), factor("b"))) >> #> Factor w/...
2018 Aug 06
0
vctrs: a type system for the tidyverse
...ecause they makes types simpler to understand and to > implement. > > Method dispatch for `vec_c()` is quite simple because associativity and > commutativity mean that we can determine the output type only by > considering a pair of inputs at a time. To this end, vctrs provides > `vec_type2()` which takes two inputs and returns their common type > (represented as zero length vector): > > str(vec_type2(integer(), double())) > #> num(0) > > str(vec_type2(factor("a"), factor("b"))) > #> Factor w/ 2 levels "a",&quo...
2018 Aug 08
4
vctrs: a type system for the tidyverse
...;>> Method dispatch for `vec_c()` is quite simple because >>>> associativity and commutativity mean that we can >>>> determine the output type only by considering a pair of >>>> inputs at a time. To this end, vctrs provides >>>> `vec_type2()` which takes two inputs and returns their >>>> common type (represented as zero length vector): >>>> >>>> str(vec_type2(integer(), double())) #> num(0) >>>> >>>> str(vec_type2(factor("a"), factor("...
2018 Aug 08
0
vctrs: a type system for the tidyverse
>>> Method dispatch for `vec_c()` is quite simple because associativity and >>> commutativity mean that we can determine the output type only by >>> considering a pair of inputs at a time. To this end, vctrs provides >>> `vec_type2()` which takes two inputs and returns their common type >>> (represented as zero length vector): >>> >>> str(vec_type2(integer(), double())) >>> #> num(0) >>> >>> str(vec_type2(factor("a"), factor("b"))) >&...
2018 Aug 08
0
vctrs: a type system for the tidyverse
...patch for `vec_c()` is quite simple because > >>>> associativity and commutativity mean that we can > >>>> determine the output type only by considering a pair of > >>>> inputs at a time. To this end, vctrs provides > >>>> `vec_type2()` which takes two inputs and returns their > >>>> common type (represented as zero length vector): > >>>> > >>>> str(vec_type2(integer(), double())) #> num(0) > >>>> > >>>> str(vec_type2(factor("...
2018 Aug 08
2
vctrs: a type system for the tidyverse
...gmail.com> wrote: > >>> Method dispatch for `vec_c()` is quite simple because associativity and > >>> commutativity mean that we can determine the output type only by > >>> considering a pair of inputs at a time. To this end, vctrs provides > >>> `vec_type2()` which takes two inputs and returns their common type > >>> (represented as zero length vector): > >>> > >>> str(vec_type2(integer(), double())) > >>> #> num(0) > >>> > >>> str(vec_type2(factor("a"),...
2018 Aug 08
2
vctrs: a type system for the tidyverse
...is quite simple because > > >>>> associativity and commutativity mean that we can > > >>>> determine the output type only by considering a pair of > > >>>> inputs at a time. To this end, vctrs provides > > >>>> `vec_type2()` which takes two inputs and returns their > > >>>> common type (represented as zero length vector): > > >>>> > > >>>> str(vec_type2(integer(), double())) #> num(0) > > >>>> > > >>>> st...
2018 Nov 06
0
An update on the vctrs package
...= letters[1:10])) #> Prototype: data.frame< #> x: integer #> y: factor<5e105> #> > ``` `vec_size()` and `vec_type()` are accompanied by functions that either find or enforce a common size (using modified recycling rules) or common type (by reducing a double-dispatching `vec_type2()` that determines the common type from a pair of types). You can read more about `vec_size()` and `vec_type()` at <https://vctrs.r-lib.org/articles/type-size.html>. ## Stability The definitions of size and prototype are motivated by my experiences doing code review. I find that I can ofte...