os_type <- function() {
.Platform$OS.type
}
sys_type <- function() {
if (os_type() == "windows") {
"windows"
} else if (Sys.info()["sysname"] == "Darwin") {
"macos"
} else if (Sys.info()["sysname"] == "Linux") {
"linux"
} else if (os_type() == "unix") {
# "unix"
"linux"
} else {
stop("Unknown OS")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.