amazon-sagemaker-examples icon indicating copy to clipboard operation
amazon-sagemaker-examples copied to clipboard

Bash commands not working inside R kernel

Open acjones27 opened this issue 7 years ago • 2 comments

Hi

I'm having issues running bash commands inside jupyter notebooks running on the R kernel. They work fine in the conda-python kernels, but in R they aren't recognised. I get an "unexpected symbol" error message.

Screenshot 2019-11-04 at 10 16 59

Could you help me? I need to be able to run terminal commands to get the rJava package installed correctly.

Thanks,

acjones27 avatar Nov 04 '19 09:11 acjones27

Screenshot 2019-11-04 at 10 18 11

Another example of something simpler to show that it's not the command itself

acjones27 avatar Nov 04 '19 09:11 acjones27

Hi @sp-anna-jones

You can run bash command in R kernel using system() function.
For example system("ls", intern=TRUE) RunningBashCmdInR

For more information checkout https://github.com/IARCbioinfo/R-tricks#running-bash-commands-from-r .

Thanks, Neelam

neelamgehlot avatar Dec 14 '19 00:12 neelamgehlot