Skip to content
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

data.frame does not support matrix types #324

Closed
chrisconlon opened this issue Mar 15, 2014 · 1 comment
Closed

data.frame does not support matrix types #324

chrisconlon opened this issue Mar 15, 2014 · 1 comment

Comments

@chrisconlon
Copy link

@chrisconlon chrisconlon commented Mar 15, 2014

Consider the following example:

load(hflights)
hflights$taxi <- as.matrix(cbind(hflights$TaxiIn,hflights$TaxiOut))
grouped <- group_by(hflights,Year,Month)

Produces the error message:

Error: column 'taxi' has unsupported type

Is this the intended behavior? (To disallow matrix types in the group_by operation within a data.frame). This was working in 0.1.1 but not in 0.1.2

If so, what is the recommended workaround? My use case is similar to "Run a regression on each group" where the user specifies the regressors. It is much more efficient to split the design matrix than it is to create a new one for each group.

@hadley
Copy link
Member

@hadley hadley commented Mar 15, 2014

It is the intended behavior. If we introduce support for matrix columns we'll need to do a lot of extra testing. If this is something that you were interested in, supplying test cases would be very useful.

Loading

@hadley hadley closed this Mar 17, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants