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

Refactoring to reduce dplyr usage and speed up locale resolution #1851

Merged
merged 9 commits into from
Aug 21, 2024

Conversation

olivroy
Copy link
Collaborator

@olivroy olivroy commented Aug 21, 2024

Avoid unnecessary tidy-eval when possible should speed things up a little

@@ -323,8 +323,8 @@ test_that(" from_column() works correctly", {
c(
"+1.11 $\\times$ 10\\textsuperscript{+4}", "+4.44 $\\times$ 10\\textsuperscript{+5}",
"+1.00 $\\times$ 10\\textsuperscript{+7}", "+1.78 $\\times$ 10\\textsuperscript{+8}",
"2.78 $\\times$ 10\\textsuperscript{9}", "NA", "5.44 $\\times$ 10\\textsuperscript{11}",
"7.10 $\\times$ 10\\textsuperscript{12}"
"2.77 $\\times$ 10\\textsuperscript{9}", "NA", # previously 2.78
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just upgraded to R 4.4.1 and got a test failure here. However, it seems like a consistent change, the test below reports 2.77, not 2.78.. We'll see what CI has to say!

@@ -318,3 +318,12 @@ test_that("fmt_datetime() works correctly", {
)
)
})

test_that("A gt table will properly output a date to LaTeX out of the box", {
skip()
Copy link
Collaborator Author

@olivroy olivroy Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted to fix an issue where a date would show badly as LaTeX, but I didn't figure it out. So added a test in the meantime.

as_latex(tab %>% fmt_date(date)) works.

Copy link
Member

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rich-iannone rich-iannone merged commit 28de628 into rstudio:master Aug 21, 2024
12 checks passed
@olivroy olivroy deleted the latex-date branch August 21, 2024 21:54
@olivroy olivroy mentioned this pull request Aug 26, 2024
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.

2 participants