Closed zhenglei-gao closed 9 years ago
I am not sure if this is an issue or it was actually the intention.
require(dplyr) ttt <- data.frame(a=1:6,b=11:16) ttt2 <- group_by(ttt,factor(ttt$a)) identical(ttt[[1]],ttt[,1]) identical(ttt2[[1]],ttt2[,1])
So in Base R, when subsetting one column, a vector is returned, but with dplyr, it is always a data frame. This made some of my old codes break. Is dplyr always working like this or this is because of an updated version of dplyr?
Yes, it's by design.
I am not sure if this is an issue or it was actually the intention.
So in Base R, when subsetting one column, a vector is returned, but with dplyr, it is always a data frame. This made some of my old codes break. Is dplyr always working like this or this is because of an updated version of dplyr?