Hello Freesurfer Developers,
I had a freesurfer-Rstudio issue today which I solved by just working on a Linux shell script. However, I wanted to know if it is possible to send freesurfer related commands from R studio out of curiosity.
My Problem:
* I was trying to use freesurfer commands like mri_convert by sending them through the "system()https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/system" function in R. * However, I got a "sh: mri_convert command not found" error. This indicates freesurfer is not sourced into the Linux terminal in the R Session.
My Question: Is it possible to run freesurfer related commands from the rstudio terminal?
What I did:
1. I looked up this problem online and found a similar examplehttps://stackoverflow.com/questions/26065564/why-cant-i-call-system-functions-in-r-that-clearly-work-in-my-terminal where the user needed the function bedtools. But updating the system path still threw the same error with . 2. In addition, I was able to send commands like "dcm2niix" from R using the system function mentioned above. I am certain this is a sourcing issue.
Would appreciate any insight Thank you
Shrikanth