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

tbl printing uses update_focus() #654

Closed
wants to merge 1 commit into from
Closed

Conversation

eutwt
Copy link

@eutwt eutwt commented Jan 2, 2024

So that the focus columns are updated according to (i.e. intersect()ed with) the current names

df <- tibble::as_tibble(as.list(setNames(letters, letters)))
attr(df, "pillar_focus") <- c('x', 'y')
df |> 
  dplyr::select(a)
#> �[90m# A tibble: 1 × 1�[39m
#>   a    
#>   �[3m�[90m<chr>�[39m�[23m
#> �[90m1�[39m a

In main this errors:

df <- tibble::as_tibble(as.list(setNames(letters, letters)))
attr(df, "pillar_focus") <- c('x', 'y')
df |> 
  dplyr::select(a)
#> Error in ctl_colonnade(df, has_row_id = if (.row_names_info(x) > 0) "*" else TRUE, : all(focus %in% names(x)) is not TRUE

Created on 2024-01-02 with reprex v2.0.2

@eutwt eutwt closed this Jan 2, 2024
@eutwt
Copy link
Author

eutwt commented Jan 2, 2024

meant to open PR to my own fork for now

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 this pull request may close these issues.

1 participant