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 recycle when the argument to recycle is the first argument. #680

Closed
jimhester opened this issue Oct 10, 2014 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@jimhester
Copy link
Member

@jimhester jimhester commented Oct 10, 2014

I would expect the following to be a data frame with 10 rows, and two columns, however data_frame returns only one row.

data_frame(x = 'hi', x = runif(10))

However this works correctly if the recycled column is not the first

data_frame(x = runif(10), y = 'hi')

looking at dataframe.R#L67-L77 it looks like it should be working regardless of the order. I will try and figure out what is going on.

jimhester added a commit to jimhester/dplyr that referenced this issue Oct 10, 2014
Before this was always using the first length, which resulted in the
data.frame being truncated if the first argument was a length 1 vector
to be recycled.

Fixes tidyverse#680
@hadley hadley added the feature label Oct 30, 2014
@hadley hadley added this to the 0.3.1 milestone Oct 30, 2014
@hadley hadley self-assigned this Oct 30, 2014
@hadley hadley closed this in 655bdf8 Nov 19, 2014
hadley added a commit that referenced this issue Nov 19, 2014
Data frame truncation - Set the row.names by the first non-short length.

Closes #680
krlmlr pushed a commit to krlmlr/dplyr that referenced this issue Mar 2, 2016
Before this was always using the first length, which resulted in the
data.frame being truncated if the first argument was a length 1 vector
to be recycled.

Fixes tidyverse#680
krlmlr pushed a commit to krlmlr/dplyr that referenced this issue Mar 2, 2016
Data frame truncation - Set the row.names by the first non-short length.

Closes tidyverse#680
@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants