rmarkdown
rmarkdown copied to clipboard
MASS::boxcox() in chunks runs interactively, but not via render()
The following code works when run interactively, or chunk by chunk, but not when knitting an Rmd:
---
title: "Untitled"
output: html_document
date: "2023-03-22"
---
```{r}
library(MASS)
df <- cars
```
```{r}
res <- lm(speed ~ dist, data = df)
```
```{r}
boxcox(res)
```
What is the issue you have ? What is the error ?
This works for me
---
title: "Untitled"
output: html_document
date: "2023-03-22"
---
```{r}
library(MASS)
```
```{r}
res <- lm(speed ~ dist, data = cars)
```
```{r}
boxcox(res)
```
