" characters are cancelling each other out at the beginning, I believe, because the quotes are incorrectly escaped. I'm not certain why they have
\\" (which is interpreted as an escaped
\ character with an unescaped
" after that, and not an escaped
" character) instead of
\" which is the proper way to escape the quote, but that likely is the cause of this problem.
Try using this instead, it may work:
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
I have done some looking into this. The instructions that were initially provided for this in the GitHub repository for the software have been marked as "Obsolete".
This is the installation instructions that they now refer to. If you are running into this issue, you should not be using the documentation on the GitHub repository, and should be using the new instructions instead.