Skip to content

Column autocomplete only works for first + even-numbered columns in 2nd dplyr chain step #12501

Closed

Description

@jonspring

When I use select or filter in a dplyr chain (using dplyr v1.0.99.9000 and RStudio 2022.07.1 Build 554), autocomplete works as expected in the first step, showing me all the available columns. However, in subsequent steps, only some columns are available for autocomplete. It seems to be column 1 + columns 2, 4, 6, 8, etc.

mtcars %>% # or |>, same result
  select(mpg, cyl, gear, carb, disp, drat, hp, am) %>%
  select(<TAB HERE>)

Screen Shot 2022-12-26 at 5 49 27 PM

Inspired by this SO question using another data set:
https://stackoverflow.com/questions/74924995/does-rstudios-autocomplete-feature-have-problems-with-dplyrs-filter-function

Activity

  1. added
    new
    on Dec 27, 2022
  2. ronblum commented on Dec 27, 2022

    @ronblum
    Contributor

    @jonspring Thank you for rising this! I can reproduce using some combinations of R 3.6.3 and 4.2.2 with dplyr 0.8.5 and 1.0.10 in

    • RStudio Desktop 1.4.1743, 2022.07.2+576, and 2022.12.0+353 on MacOS 13.2
    • RStudio Server 2022.12.0+353 on Ubuntu 20.04 via Chrome on MacOS 13.2

    We'll review this as we continue development of RStudio.

    Triage: I'm surprised that this hasn't come up before, hence trying out multiple older combinations.

  3. added
    autocompletion
    and removed
    new
    on Dec 27, 2022
  4. mikebessuille commented on Jan 3, 2023

    @mikebessuille
    Contributor

    @jgutman what do you think? (Note: this is not a regression)

  5. added this to the Backlog-1 milestone on Jan 9, 2023
  6. self-assigned this
    on Jan 16, 2025
  7. ronblum commented on Mar 12, 2025

    @ronblum
    Contributor

    Verified fixed in RStudio Desktop Pro 2025.04.0-daily+360.pro22 on Windows 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

autocompletionbug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions