`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

Projects
None yet
2 participants

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)
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 Jan 2, 2014

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.

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