I googled rstudio code 10 for you: R studio doesn't link with R (exiting with code 10) - RStudio IDE - RStudio Community
rstudio code 10