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

ddply drops all but the first matrix column from AsIs elements of the data frame #183

Closed
cubranic opened this issue Dec 31, 2013 · 3 comments

Comments

@cubranic
Copy link

Check the behaviour of the following code on plyr 1.7.1 vs. 1.8:

df <- data.frame(a = sample(letters[1:2], 6, TRUE), b = I(matrix(1:18, 6)))
str(df) # column 'b' has dimension 6x3 

# post 1.7.1, column 'b' in each split contains only the first column of the original 'b' matrix
ddply(df, .(a), str)
@hadley
Copy link
Owner

hadley commented Jan 2, 2014

plyr is unlikely to support matrices in columns in general, unfortunately. dplyr might do better.

@hadley hadley closed this as completed Jan 2, 2014
@cubranic
Copy link
Author

cubranic commented Jan 2, 2014

It used to, though. You don't think this is a regression introduced in 1.8?

On 2014-01-02, at 1:16 PM, Hadley Wickham wrote:

plyr is unlikely to support matrices in columns in general, unfortunately. dplyr might do better.


Reply to this email directly or view it on GitHub.

@hadley
Copy link
Owner

hadley commented Jan 2, 2014

It would be a regression if I'd planned for it to work in the first place ;) It's also possible some of the rbind.fill() improvements coming down the line might fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants