davidgohel / flextable

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

R 4.4.0 and flextable_to_rmd: Error in .make_numeric_version() #630

Closed Steinthal closed 6 months ago

Steinthal commented 6 months ago

The generation of this Quarto file stops due to an error then using R 4.4.0. It is generated correctly with R 4.3.3:

---
title: "Test Flextable"
format: pdf
---

```{r}
#| warning: false
#| message: false
#| echo: false

library(flextable)
library(knitr)
#| warning: false
#| message: false
#| echo: false
#| output: asis

ft <- flextable(head(mtcars)) |>
  autofit() |>
  flextable_to_rmd()


## Error message

"processing file: test_flextable.qmd
|.......................................... | 80% [unnamed-chunk-2]
Quitting from lines at lines 17-30 [unnamed-chunk-2] (test_flextable.qmd)

Error in .make_numeric_version():
! invalid non-character version specification 'x' (type: double)

Backtrace:

flextable::flextable_to_rmd(autofit(flextable(head(mtcars))))
flextable:::is_in_quarto()
base::Ops.numeric_version(...)
base::as.numeric_version(e1)
base::numeric_version(x)
base::.make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version)
Execution halted"

## Environment

- Rstudio Version 2024.04.0+735 (2024.04.0+735)
- R version: 4.4.0
- flextable 0.9.5
davidgohel commented 6 months ago

see

Steinthal commented 6 months ago

Umm, sorry, didn't see those before posting.

github-actions[bot] commented 3 weeks 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.