How to resolve tidyverse_conflicts()

Hello.

I'm running a tool from the command line that utilizes Rscript. The tool required me to install the R packages: argparse, plotly and ggsci. No other dependency.

The problem is that after doing everything it requires, when I try to run the tool via command line (the ONLY way to run it is via command line), it generates the following :


R scripting front-end version 4.1.2 (2021-11-01)
── Attaching packages ────────────────────────────────────────────────────────── tidyverse 1.3.2 ──
✔ tibble  3.1.8      ✔ dplyr   1.0.10
✔ tidyr   1.2.1      ✔ stringr 1.4.1 
✔ readr   2.1.3      ✔ forcats 0.5.2 
✔ purrr   0.3.5      
── Conflicts ───────────────────────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks plotly::filter(), stats::filter()
✖ dplyr::lag()    masks stats::lag()
Warning message:
In if (args$input == "auto") { :
  the condition has length > 1 and only the first element will be used
`summarise()` has grouped output by 'file'. You can override using the `.groups` argument.
`summarise()` has grouped output by 'file', 'has_adapter'. You can override using the `.groups`
argument.
`summarise()` has grouped output by 'file', 'has_adapter'. You can override using the `.groups`
argument.
Warning message:
In min(adapter_lengths) : no non-missing arguments to min; returning Inf
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plotly.com/r/reference/#scatter
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plotly.com/r/reference/#scatter
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plotly.com/r/reference/#scatter
No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plotly.com/r/reference/#scatter
Error in htmlwidgets::saveWidget(as_widget(p_all), outname) : 
  Saving a widget with selfcontained = TRUE requires pandoc. For details see:
https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md
Execution halted

I'm using POP OS.

Can you be a bit more specific about the problem? Is it really the case that the script you are invoking via RScript doesn't have library(tidyverse) in it anywhere? Of that output, what weren't you expecting?

Try

install.packages("pandoc")

Most of the output you are showing are warning messages, not errors, (among them the package names conflicts) so whether or not they are important depends on your actual code and its purpose.

The only actual error message you are showing suggests that either you don't have pandoc installed in your system (not an R package), or, its path is not defined for the RScript environment, if the latter, you can work around this by defining the RSTUDIO_PANDOC
environment variable in your script, with a line like this (but pointing to your actual pandoc binary).

Sys.setenv(RSTUDIO_PANDOC="/usr/lib/rstudio-server/bin/pandoc")
1 Like

This topic was automatically closed 21 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.