Skip to content

grouped_df changes type of vars argument #665

@kasterma

Description

@kasterma

I just did:

install.packages("devtools")
devtools::install_github("hadley/lazyeval")
devtools::install_github("hadley/dplyr")

So this concerns the latest version available on github.

Executing:

library(dplyr)
features <- list("feat1", "feat2", "feat3")
class(features[[1]])
grouped_df(data.frame(feat1=1, feat2=2, feat3=3), features)
class(features[[1]])

Shows that the class of features has changed from "character" to name. Here is a copy paste from an Rstudio repl:

> library(dplyr)

Attaching package: ‘dplyr’

The following object is masked from ‘package:stats’:

    filter

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> features <- list("feat1", "feat2", "feat3")
> class(features[[1]])
[1] "character"
> grouped_df(data.frame(feat1=1, feat2=2, feat3=3), features)
Source: local data frame [1 x 3]
Groups: feat1, feat2, feat3

  feat1 feat2 feat3
1     1     2     3
> class(features[[1]])
[1] "name"
> 

From the top of the repl:

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions