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

plyr does not preserve names in nested calls #107

Closed
karthik opened this issue Oct 18, 2012 · 3 comments · Fixed by #188
Closed

plyr does not preserve names in nested calls #107

karthik opened this issue Oct 18, 2012 · 3 comments · Fixed by #188

Comments

@karthik
Copy link

karthik commented Oct 18, 2012

See related Stack Overflow question will all the details to replicate the problem.

A fix on at the plyr end would be to check for an existing .id column before adding one so it could be renamed appropriately.

@krlmlr
Copy link

krlmlr commented Jan 6, 2014

Now the .id column can be renamed by passing a value to the new .id parameter in ldply.

@hadley
Copy link
Owner

hadley commented Jan 6, 2014

Maybe it should automatically pick a new column if there's already an .id column?

@krlmlr
Copy link

krlmlr commented Jan 7, 2014

I think that most of the times we want to give an expressive name to the .id column anyway (which motivated my patch). Say, if we have two lists that define size and shape of something and run a nested ldply for all combinations of size and shape, we want two columns Size and Shape in the resulting data frame, and not .id and .id2.

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

Successfully merging a pull request may close this issue.

3 participants