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
I think there might be a bug when using $asDataFrame() on pivottable with NULL rows.
I don't know if it comes from actually first using qpvt() but here the code is below.
library(pivottabler)
X<- qpvt(iris, NULL, "Species", "mean(Sepal.Length)")
X$asDataFrame()
#> Error in grps[[c]]: attempt to select less than one element in integerOneIndexX<- qpvt(iris, "Species", "Species", "mean(Sepal.Length)")
X$asDataFrame()
#> setosa versicolor virginica Total#> setosa 5.006 NA NA 5.006000#> versicolor NA 5.936 NA 5.936000#> virginica NA NA 6.588 6.588000#> Total 5.006 5.936 6.588 5.843333X<- qpvt(iris, "Species", NULL, "mean(Sepal.Length)")
X$asDataFrame()
#> calc000001#> setosa 5.006000#> versicolor 5.936000#> virginica 6.588000#> Total 5.843333
I think there might be a bug when using
$asDataFrame()
on pivottable withNULL
rows.I don't know if it comes from actually first using
qpvt()
but here the code is below.Created on 2020-03-27 by the reprex package (v0.3.0)
PS: thank you very much for this package. Actually the best I've used so far for pivot table in
R
The text was updated successfully, but these errors were encountered: