davidgohel / flextable

table farming
https://ardata-fr.github.io/flextable-book/
561 stars 81 forks source link

Flextable issue in R-4.4.0 #629

Closed samrodgersmelnick closed 6 months ago

samrodgersmelnick commented 6 months ago

I just updated to R 4.4.0

I am getting this error when trying to knit my quarto file and place a table in

flextable() |> autofit() |> bold(bold = TRUE, part = "header") |> theme_zebra(odd_header = "white") |> hline_top(part="body")

The error says processing file:
Quitting from lines at lines 342-422 [unnamed-chunk-13] (Rodgers-MelnickMT_LOS_CRSP500_TableTest.qmd) Error in .make_numeric_version(): ! invalid non-character version specification 'x' (type: double) Backtrace:

  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output) ...
    1. flextable:::is_in_quarto()
    2. base::Ops.numeric_version(...)
    3. base::as.numeric_version(e1)
    4. base::numeric_version(x)
    5. base::.make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version)

Execution halted

Flextable works fine when just running the R code, but it does not knit to html. Please advise.

tkerwin commented 6 months ago

I am seeing the exact same error on my system after just updating to R-4.4.0.

tkerwin commented 6 months ago

It looks like this was fixed in #628 but the package on CRAN is not updated yet. I tried the dev version and it seems to work fine.

samrodgersmelnick commented 6 months ago

Wow! That fixed it. Thank you so much for your prompt response!!!

install.packages("flextable", repos = c("https://davidgohel.r-universe.dev", "https://cran.r-project.org"))

github-actions[bot] commented 1 week ago

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.