Hi there,
We have just created a new project , and to run the scripts included we have to access a program called cutadapt, which I succesfully installed (but it does so in the folder /home/rstudio-user/.local/bin/
) so I have to add it to the $PATH
I can open a terminal window and run cutadapt --version
and I can get the expected output 2.10
; but if I try R to find this piece of software it does not manage to do it. So either with the console
system2('cutadapt', args = "--version")
it returns
sh: 1: cutadapt: not found
Warning message:
In system2("cutadapt", args = "--version") : error in running command
or with a Rmarkdown opening a bash chunk and running
cutadapt --version
it returns
/tmp/RtmpMzcC2h/chunk-code-b6f61eae772.txt: line 1: cutadapt: command not found
.
I think the $PATH I set up in the console and the one R is using are different? How can I either:
- Add a local folder to the PATH variable that R is using; or
- copy a binary file to a place where the PATH variable can see it.
Ideally I want this only to be done once (by me) and not by every student that will eventually create a copy of this project.
Many, many thanks