#' r_path
#'
#' @return System's path to R.exe
#' @export
r_path <- function(){
r_bin <- R.home("bin")
if("R.exe" %in% list.files(r_bin)){
return(file.path(r_bin,"R.exe"))
}else if("R" %in% list.files(r_bin)){
return(file.path(r_bin,"R"))
}
stop("R.exe not found.")
}
#' rscript_path
#'
#' @return System's path to Rscript.exe
#' @export
rscript_path <- function(){
r_bin <- R.home("bin")
if("Rscript.exe" %in% list.files(r_bin)){
return(file.path(r_bin,"Rscript.exe"))
}else if("Rscript" %in% list.files(r_bin)){
return(file.path(r_bin,"Rscript"))
}
stop("Rscript.exe not found.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.