You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @gdemin
Recently data.table merged some new dcast code which uses more strict checking of fun.aggregate, which is supposed to be a function which returns a single value. This is documented on ?dcast: " The aggregating function should take a vector as input and return a single value (or a list of length one) as output."
Using new data.table from github master, we ran example("to_wide") which gave the following:
It seems that to_wide is calling dcast with fun.aggregate=identity which is problematic because that returns a vector with length>1. Can you please modify your code so that it uses a fun.aggregate that returns a single value? (length=1)
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Thank you, I will fix it in the near future.
I think I will change the test and leave identity as default. This is because I mostly use to_wide for conversion from long form. In this case for each combination there should be only one value. And if there are more values then something is going wrong and an error message is absolutely appropriate.
Hi @gdemin
Recently data.table merged some new dcast code which uses more strict checking of fun.aggregate, which is supposed to be a function which returns a single value. This is documented on ?dcast: " The aggregating function should take a vector as input and return a single value (or a list of length one) as output."
Using new data.table from github master, we ran
example("to_wide")
which gave the following:Details: Rdatatable/data.table#6032
It seems that
to_wide
is calling dcast withfun.aggregate=identity
which is problematic because that returns a vector with length>1. Can you please modify your code so that it uses afun.aggregate
that returns a single value? (length=1)Thanks in advance!
The text was updated successfully, but these errors were encountered: