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

tribble: "Can't merge the outer name" error introduced in v 3 #775

Closed
misea opened this issue May 21, 2020 · 2 comments · Fixed by #782
Closed

tribble: "Can't merge the outer name" error introduced in v 3 #775

misea opened this issue May 21, 2020 · 2 comments · Fixed by #782
Labels
bug an unexpected problem or unintended behavior

Comments

@misea
Copy link

misea commented May 21, 2020

A recent-ish change in tribble broke some existing code of mine.

If a value supplied to tribble has a name of its own, tribble now returns a "Can't merge the outer name" error. Reports an error 3.0.1 and I know it used to work in 2.0.1, though I'm not sure when it broke

# This now fails in tibble 3.0.1, worked in 2.0.1
library(tribble)

v <- c(a = 1)
tribble(~a, v[1])

# Error: Can't merge the outer name `a` with a vector of length > 1.
# Please supply a `.name_spec` specification.

# This works
w = c(1)
tribble(~a, w[1])
@hadley
Copy link
Member

hadley commented Jun 5, 2020

Somewhat more minimal reprex:

tibble::tribble(~ x, c(a = 1))
#> Error: Can't merge the outer name `x` with a vector of length > 1.
#> Please supply a `.name_spec` specification.

Created on 2020-06-05 by the reprex package (v0.3.0)

@hadley hadley added the bug an unexpected problem or unintended behavior label Jun 5, 2020
hadley pushed a commit that referenced this issue Jun 5, 2020
krlmlr added a commit that referenced this issue Jun 13, 2020
- `tribble()` now better handles named inputs (#775) and objects of non-vtrs classes like `lubridate::Period` (#784) and `formattable::formattable` (#785).

Closes #784. Closes #785.
krlmlr added a commit that referenced this issue Feb 25, 2021
tibble 3.0.2

- `[[` works with classed indexes again, e.g. created with `glue::glue()` (#778).
- `add_column()` works without warning for 0-column data frames (#786).
- `tribble()` now better handles named inputs (#775) and objects of non-vtrs classes like `lubridate::Period` (#784) and `formattable::formattable` (#785).

- Subsetting and subassignment are faster (#780, #790, #794).
- `is.null()` is preferred over `is_null()` for speed.
- Implement continuous benchmarking (#793).

- `is_vector_s3()` is no longer reexported from pillar (#789).
@github-actions
Copy link
Contributor

github-actions bot commented Jun 14, 2021

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants