Skip to content

"Recipe: Compile Rnw files" calls Anacondas version of R #3099

Answered by jlelong
pehkawn asked this question in Q&A
Discussion options

You must be logged in to vote

Which means R 4.1.2 must be set in $PATH, right?

Not necessarily, The PATH used by VS Code when running a recipe is

/opt/anaconda3/bin:/opt/anaconda3/condabin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/mplusdemo

This value of the PATH may be different from the one you have in a terminal (even in the terminal pane of VS Code). Check by running echo $PATH.

[17:05:50] Recipe step 1: Rscript, -e,knitr::opts_knit$set(concordance = TRUE); knitr::knit('lwe.Rnw')```

Note that the recipe for compiling .rnw files looks for a Rscript executable and not directly for R. You may have a Rscript pointing to the wrong R

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by James-Yu
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
external issue Issue with something else than LaTeX-Wokshop
2 participants
Converted from issue

This discussion was converted from issue #3028 on February 20, 2022 00:03.