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

Version 1.4.1 of Tibble Seems to Misalign Data and Headers #355

Closed
jeff-mettel opened this issue Jan 5, 2018 · 3 comments
Closed

Version 1.4.1 of Tibble Seems to Misalign Data and Headers #355

jeff-mettel opened this issue Jan 5, 2018 · 3 comments

Comments

@jeff-mettel
Copy link

jeff-mettel commented Jan 5, 2018

With the newest version of tibble, it appears headers and the underlying data can be misaligned when displayed in RStudio. Here is an example:

iris %>% as_tibble()

Inside RStudio, it appears as follows (Note the misalignment):

image

Oddly, when copying and pasting, the alignment is as expected:

> iris %>% as_tibble()
# A tibble: 150 x 5
   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
          <dbl>       <dbl>        <dbl>       <dbl> <fctr> 
 1         5.10        3.50         1.40       0.200 setosa 
 2         4.90        3.00         1.40       0.200 setosa 
 3         4.70        3.20         1.30       0.200 setosa 
 4         4.60        3.10         1.50       0.200 setosa 
 5         5.00        3.60         1.40       0.200 setosa 
 6         5.40        3.90         1.70       0.400 setosa 
 7         4.60        3.40         1.40       0.300 setosa 
 8         5.00        3.40         1.50       0.200 setosa 
 9         4.40        2.90         1.40       0.200 setosa 
10         4.90        3.10         1.50       0.100 setosa 
# ... with 140 more rows

@iacobus42
Copy link

iacobus42 commented Jan 5, 2018

This has been brought up elsewhere (#351, #346, #349, #354) and it appears to relate to an issue with RStudio's default font selection, at least on OSX, have a wider bold character than a non-bold character (rstudio/rstudio#1721). This is a feature of the font that is being used - it isn't a problem with the tibble package per se.

I fixed the alignment issue by switching the font that RStudio uses from Monaco to Menlo-Regular. It isn't a perfect fix (since the user encounters a problem on a fresh install using the defaults in RStudio on, at least, MacOS) but it is a temporary fix.

@hadley
Copy link
Member

hadley commented Jan 8, 2018

Duplicate of r-lib/pillar#76

@hadley hadley marked this as a duplicate of r-lib/pillar#76 Jan 8, 2018
@hadley hadley closed this as completed Jan 8, 2018
@github-actions
Copy link
Contributor

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 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants