I've been trying to use xmstarlet in R instead of running my xmlstarlet script in bash and then pipe it to R, but everything I've tried hasn't worked. I am not even sure if it is possible.
I've tried this:
shell(cmd=(xmlstarlet sel -t -c "someinput"), intern=TRUE)
The command alone in bash works, but when I try to do this, I get this error:
Error: unexpected symbol in "shell(cmd=(xmlstarlet sel"
I an not really sure if I should be using system()
instead of shell
. I've also used system, but without success
EDIT:
Full command example, can also be found here with full xml file
xmlstarlet sel -t -m "/bookstore/book/Description" -i "@stock='YES'" -v '/bookstore/book/Location/shelf'