writeLines('options(repos = "https://cran.rstudio.com")', '~/.Rprofile')
if (.Platform$OS.type == 'unix' || Sys.getenv('R_LIBS_USER') == '') {
dir.create('~/R', FALSE, TRUE)
writeLines('R_LIBS_USER="~/R"', '~/.Renviron')
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.