-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathliftrTestVanilla.Rmd
More file actions
41 lines (32 loc) · 983 Bytes
/
liftrTestVanilla.Rmd
File metadata and controls
41 lines (32 loc) · 983 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: "Dockerized R Markdown Document"
author: "Nan Xiao"
date: "`r Sys.Date()`"
output:
html_document
liftr:
from: "rocker/r-base:latest"
maintainer: "Nan Xiao"
maintainer_email: "me@nanx.me"
cranpkg:
- kernlab
---
## Spectral clustering example
This is an R Markdown document that could be rendered under a Docker container using `liftr`. The document requires the `specc()` function in the `kernlab` package on CRAN to perform a simple spectral clustering:
```{r specc, fig.cap = 'Spectral Clustering of Spirals Data'}
library("kernlab")
data(spirals)
sc = specc(spirals, centers = 2)
print(sc)
plot(spirals, col = sc)
```
## Options of liftr in this document
The document front-matter metadata includes the options for `liftr`, which is used for dockerizing the document:
```{r liftrmeta}
rmarkdown::metadata$liftr
```
## System and session information
The R session information of the Docker container is shown below.
```{r session}
sessionInfo()
```