Skip to content

plyr does not preserve names in nested calls #107

Closed
karthik opened this Issue Oct 18, 2012 · 3 comments

3 participants

@karthik
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 krlmlr added a commit to krlmlr/plyr that referenced this issue Apr 6, 2013
@krlmlr krlmlr New parameter .id for ldply() to specify name of .id column; fixes #140
…; fixes #107
93fc3f2
@krlmlr krlmlr added a commit to krlmlr/plyr that referenced this issue Apr 20, 2013
@krlmlr krlmlr New parameter .id for ldply() to specify name of .id column; fixes #140
…; fixes #107
1f0dd35
@krlmlr krlmlr added a commit to krlmlr/plyr that referenced this issue Apr 20, 2013
@krlmlr krlmlr New parameter .id for ldply() to specify name of index column (defaul…
…t: .id); fixes #140; fixes #107
2ee2dca
@krlmlr krlmlr added a commit to krlmlr/plyr that referenced this issue Jul 6, 2013
@krlmlr krlmlr New parameter .id for ldply() to specify name of index column (defaul…
…t: .id); fixes #140; fixes #107
b65a3e1
@krlmlr krlmlr added a commit to krlmlr/plyr that referenced this issue Oct 24, 2013
@krlmlr krlmlr New parameter .id for ldply() to specify name of index column (defaul…
…t: .id); fixes #140; fixes #107
e49b33a
@krlmlr krlmlr added a commit to krlmlr/plyr that referenced this issue Nov 4, 2013
@krlmlr krlmlr New parameter .id for ldply() to specify name of index column (defaul…
…t: .id); fixes #140; fixes #107
dd29af0
This was referenced Nov 4, 2013
@hadley hadley closed this in #188 Jan 6, 2014
@krlmlr
krlmlr commented Jan 6, 2014

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

@hadley
Owner
hadley commented Jan 6, 2014

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

@krlmlr
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
Something went wrong with that request. Please try again.