-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathknitr.R
More file actions
27 lines (27 loc) · 749 Bytes
/
knitr.R
File metadata and controls
27 lines (27 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
version <- getRversion()
cat("--- YAML_START ---\n")
cat("versionMajor:", version$major, "\n")
cat("versionMinor:", version$minor, "\n")
cat("versionPatch:", version$patch, "\n")
cat("home:", R.home(), "\n")
cat("libPaths:\n")
for (lib in .libPaths()) {
cat(paste0(' - ', shQuote(lib)), "\n")
}
cat("platform:", R.version[['platform']], "\n")
cat("packages:\n")
cat(" knitr: ")
if (requireNamespace("knitr", quietly = TRUE)) {
cat(paste0('\"', as.character(utils::packageVersion("knitr")), '\"'))
} else {
cat("null")
}
cat("\n")
cat(" rmarkdown: ")
if (requireNamespace("rmarkdown", quietly = TRUE)) {
cat(paste0('\"', as.character(utils::packageVersion("rmarkdown")), '\"'))
} else {
cat("null")
}
cat("\n")
cat("--- YAML_END ---\n")