parsnip print generates unreadable characters for rmarkdown/quarto inline output

I have encountered a very weird issue with interactions of the most recent versions of R (4.5.1), Rstudio (2025.09.2+418), and Parsnip (1.3.3). I'm running this on a Mac M2 ARM with MacOS 26.

If I try to display the contents of a parsnip object related to model prediction using print(), the results are an unreadable series of boxes with a question mark in each (suggesting a character encoding issue).

This only is the case when printing from within an Rmarkdown chunk inline. If I send chunk output to the console it is fine. If I run the same print command in the console it is fine. Most output prints fine inline. It seems to be only certain objects. I will give an example below.

E_Iberia.lithics.mr.best <- 
  E_Iberia.lithics.mr.wf %>% 
  tune_grid(vf10.all,
            grid = 25,
            control = control_grid(save_pred = TRUE),
            metrics = metric_set(roc_auc))%>% 
  select_best(metric = "roc_auc")

print(E_Iberia.lithics.mr.best)

This code chunk sends the results of dials tuning to a parsnip object E_Iberia.lithics.mr.best, which should display like this:

> print(E_Iberia.lithics.mr.best)
# A tibble: 1 × 3
      penalty mixture .config         
        <dbl>   <dbl> <chr>           
1 0.000000215  0.0896 pre0_mod09_post0

This is indeed what it looks like in the console.
However, the inline chunk output looks like this screenshot

Other parsnip objects, like a model fit object, print fine. This seems limited to ones related to model prediction.

There is nothing weird or incorrect with the character encoding settings AFAICT. Most stuff prints fine. Things in the console print fine. It is only some objects printed from RMarkdown chunks inline. That do this.

It seems to have started after updating to the most recent versions of R, RStudio, and Parsnip.

Has anyone else run into this? Any suggestions about how to fix it? I'm baffled.

Michael Barton

other people have had font issues as well and reinstalling some fonts seems to have helped: macOS Tahoe: Inline table text encoding error in RStudio with Quarto and Rmarkdown

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.