rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

MASS::boxcox() in chunks runs interactively, but not via render()

Open cjvanlissa opened this issue 2 years ago • 1 comments

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)
```

cjvanlissa avatar Mar 22 '23 15:03 cjvanlissa

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)
```

image

cderv avatar Mar 22 '23 15:03 cderv