0

I'm working on an R script for a big package. Part of the code uses a C package (say it's package X) I installed from github . The path for it is in usr/local/bin/X

In Perl scripts if I type system("package X commands") and run it through the terminal, it runs smoothly.

However for some reason when I type system("package X commands") in the R GUI terminal , R doesn't recognise the package commands.

Any suggested solution?

shadow.T
  • 125
  • 1
  • 2
  • 11
  • 2
    Maybe you want `System` or `System2`. You need to provide more details and something closer to a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – lmo Nov 13 '17 at 01:22
  • 1
    Try `system("usr/local/bin/X/package X commands")` – G5W Nov 13 '17 at 01:25
  • Still gives the same error : bin/sh command not found , it also gave me that there is no such file or directory for the package path – shadow.T Nov 13 '17 at 01:26
  • Check the `$PATH` used by `system` with `system('echo $PATH')`; it may be different from what you see directly in a shell. This is all a little OS-dependent, though. – alistaire Nov 13 '17 at 02:53

0 Answers0