Bug report: R.home() cause package Rcpp failed executing sourceCpp, similar bug are labeled "BUG 16660" since 2016 and here I could provide a solution that tested in my laptop.
The short answer, supported (if memory serves) by the R Windows FAQ, is to _not_ install in a path with spaces in the first place. Pondering why R on Windows, after all these years, still uses a path with spaces as the default choice is left as exercise to the reader. Dirk
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org