-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
groupingsets() adding an extra column with named vectors? #5206
Comments
Could you check verbose=T (if there is)? I think it may not be related to groupingsets, it calls ordinary dt code under the hood. |
Setting
|
Hm, it was split function that had verbose arg. Grouping sets doesn't provide this level of debug. |
I removed development version and installed again from CRAN and the issue is gone. |
For reproduceability and can confirm that there is an issue/changing behavior # 1.14.2
groupingsets(
data.table(iris),
j = mean(Sepal.Length),
by = c('Sp' = 'Species'),
sets = list('Species')
)
# Species V1
# <fctr> <num>
# 1: setosa 5.006
# 2: versicolor 5.936
# 3: virginica 6.588
# current dev 1.14.3
groupingsets(
data.table(iris),
j = mean(Sepal.Length),
by = c('Sp' = 'Species'),
sets = list('Species')
)
# Sp V1 Species
# <fctr> <num> <fctr>
# 1: <NA> 5.006 setosa
# 2: <NA> 5.936 versicolor
# 3: <NA> 6.588 virginica Doing some digging current behavior was introduced by #4713 |
I'm using latest development version of
data.table
andR 4.1.0
. This seems not to have been the behaviour about three months ago when I last ran the code that now broke.The text was updated successfully, but these errors were encountered: