In R I would like to store a console command to a variable. I have already tried with the solutions proposed in the following link but without luck: In R, is it possible to redirect console output to a variable? Here you are the command I'm using:
test <- capture.output(system("pa11y scuolafalconeborsellino.it; perl -e \"print unpack('c', pack('C', $?)), \\$/\""), file = NULL)
The output visiblein the console is:
[4m[36m Welcome to Pa11y[39m[24m [90mWe'll sniff your page for you now. [39m [36m > [39mLoading page... [36m > [39mRunning HTML CodeSniffer... [36m > [39m[31mError: HTML CodeSniffer error[39m
but the variable test is empty.