This question is related to the answer to this question:
Batch measurements of .wav files with sox stats
I have a similar problem and was happy to see what looked like a fairly solid solution already on stackoverflow. However I discovered R for the first time and downloaded R Command to try but I am getting only error messages when I try to execute this code in the R Commander interpreter:
spam = system("sox foo2.wav -n stat 2>&1", intern = TRUE)
If I add a foo2.wav file in the sox containing folder the error is:
running command 'sox foo2.wav -n stat 2>&1' had status 2
If I try to put the exact location of the file like this:
spam = system("sox C:\Program Files (x86)\sox-14-4-2\foo2.wav -n stat 2>&1", intern = TRUE)
...then the error is:
Error: '\P' is an unrecognized escape in character string starting ""sox C:\P"
...I tried to double quote the strings but to no avail. The code spam = system("sox "C:\Program Files (x86)\sox-14-4-2\foo2.wav" -n stat 2>&1", intern = TRUE)
ended up with the following error:
Error: unexpected symbol in "spam = system("sox "C"
I even tried:
spam = system("sox file.path("C:", "Program Files (x86)", "sox-14-4-2", "foo2.wav") -n stat 2>&1", intern = TRUE)
To no avail...
I can confirm I have sox working correctly through the Windows command line. Can anyone help me to understand?
Thanks in advance!