I am trying to find out how to capture the error message from system()
EX:
> res <- system("ls home",intern=TRUE)
ls: cannot access home: No such file or directory
Warning message:
running command 'ls home' had status 2
> res
character(0)
attr(,"status")
[1] 2
Is there a way to capture the "ls: cannot access home: No such file or directory" in res?