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

printing of "tbl_df" without "tbl" class broken #263

Closed
t-kalinowski opened this issue May 26, 2017 · 2 comments
Closed

printing of "tbl_df" without "tbl" class broken #263

t-kalinowski opened this issue May 26, 2017 · 2 comments
Milestone

Comments

@t-kalinowski
Copy link

@t-kalinowski t-kalinowski commented May 26, 2017

Hello,

I have some datasets in a package that recently stopped printing...
Possibly related to #256

library(tibble)
tmtc <- as_tibble(mtcars)
tmtc
#> # A tibble: 32 x 11
#>      mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb
#>  * <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1  21.0     6 160.0   110  3.90 2.620 16.46     0     1     4     4
#>  2  21.0     6 160.0   110  3.90 2.875 17.02     0     1     4     4
#>  3  22.8     4 108.0    93  3.85 2.320 18.61     1     1     4     1
#>  4  21.4     6 258.0   110  3.08 3.215 19.44     1     0     3     1
#>  5  18.7     8 360.0   175  3.15 3.440 17.02     0     0     3     2
#>  6  18.1     6 225.0   105  2.76 3.460 20.22     1     0     3     1
#>  7  14.3     8 360.0   245  3.21 3.570 15.84     0     0     3     4
#>  8  24.4     4 146.7    62  3.69 3.190 20.00     1     0     4     2
#>  9  22.8     4 140.8    95  3.92 3.150 22.90     1     0     4     2
#> 10  19.2     6 167.6   123  3.92 3.440 18.30     1     0     4     4
#> # ... with 22 more rows
rlang::set_attrs(tmtc, class = c("tbl_df", "data.frame"))
#> Error in format.default(x[[i]], ..., justify = justify): argument 2 matches multiple formal arguments
@krlmlr
Copy link
Member

@krlmlr krlmlr commented May 27, 2017

Thanks. Subsequent versions of tibble will complain louder and louder if a tibble doesn't have the tbl class, for now we'll keep it compatible.

@krlmlr krlmlr closed this in 393bd83 May 27, 2017
krlmlr added a commit that referenced this issue May 29, 2017
- Added `format()` and `print()` methods for both `tbl` and `tbl_df` classes, to protect against malformed tibbles that inherit from `"tbl_df"` but not `"tbl"`, as created e.g. by `ungroup()` in dplyr 0.5.0 and earlier (#256, #263).
- The column width for non-syntactic columns is computed correctly again (#258).
- Printing a tibble doesn't apply quote escaping to list columns.
- Fix error in `tidy_names(syntactic = TRUE, quiet = FALSE)` if not all names are fixed (#260, @imanuelcostigan).
- Remove unused import declaration for assertthat.
@krlmlr krlmlr added this to the 1.5.0 milestone Oct 22, 2018
@github-actions
Copy link

@github-actions github-actions bot commented Dec 9, 2020

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 Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants