radian: Error when trying to use dplyr::mutate() in an RMarkdown (Rmd) file
I am running:
- Ubuntu 16.04.5 LTS on an x86_64 platform,
- R 3.5.2 with dplyr 0.8.0.1 and tibble 2.0.1, and
- radian 0.3.1 on Python 3.7.2.
The following RMarkdown (Rmd) file…
---
title: "Minimal working example"
output:
pdf_document:
latex_engine: pdflatex
---
```{r}
library(tibble)
library(dplyr)
tbl = tribble(
~category, ~value,
"a", 1,
"a", 2,
"b", 3,
"b", 4)
tbl %>% mutate(category = toupper(category))
```
…does not compile when I attempt to render it from a radian session:
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Platform: x86_64-pc-linux-gnu (64-bit)
r$> rmarkdown::render("tmp.Rmd")
processing file: tmp.Rmd
|................................ | 50%
ordinary text without R code
|.................................................................| 100%
label: unnamed-chunk-1
Quitting from lines 9-20 (tmp.Rmd)
Error in mutate_impl(.data, dots, caller_env()) :
SET_VECTOR_ELT() can only be applied to a 'list', not a 'symbol'
The above function (rmarkdown::render("tmp.Rmd")) does, however, work when in an R session.
Do you have any ideas about what the issue is?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (11 by maintainers)
Just to add: I likewise cannot reproduce this. Thanks for looking into this—and for all of your work on radian.
I tried a docker image of R 3.5.2 from https://hub.docker.com/r/rocker/tidyverse/ and the Rmd above could be rendered just fine.