bad_weak_ptr error when knitting to html

This has turned up before, and was closed down without a resolution. In my case this error turns up when knit::opts_chunk$set(cache = TRUE). If I change that to cache = FALSE all is well and I get a knitted html document at the end. I am using the latest R and RStudio -- 4.4.1 and (2024.04.2+764) respectively -- updated today.

Hi and welcome to the forum.

I think we need to see your code and some sample data. See

FAQ Asking Questions

Just copy your code and paste it here between
```

```

A handy way to supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where mydata is your data. Copy the output and paste it here between
```

```