Browse code

adding testing vignette

Kasper Daniel Hansen authored on 14/09/2015 18:05:18
Showing2 changed files

... ...
@@ -2,7 +2,7 @@ Package: Rgraphviz
2 2
 Title: Provides plotting capabilities for R graph objects
3 3
 Description: Interfaces R with the AT and T graphviz library for
4 4
         plotting R graph objects from the graph package.
5
-Version: 2.13.0
5
+Version: 2.13.1
6 6
 Authors@R: c(person(c("Kasper", "Daniel"), "Hansen", role = c("cre", "aut"),
7 7
                     email = "kasperdanielhansen@gmail.com"),
8 8
              person("Jeff", "Gentry", role = "aut"),
... ...
@@ -21,7 +21,11 @@ Imports: stats4,
21 21
 	 grDevices
22 22
 Suggests: RUnit,
23 23
 	  BiocGenerics,
24
+	  knitr,
25
+	  rmarkdown,
26
+	  BiocStyle,
24 27
 	  XML
28
+VignetteBuilder: knitr
25 29
 SystemRequirements: optionally Graphviz (>= 2.16)
26 30
 GraphvizDetails: Graphviz 2.28.0
27 31
 License: EPL
... ...
@@ -42,3 +46,4 @@ Collate: AllGenerics.R
42 46
 	 writers.R
43 47
 	 zzz.R
44 48
 biocViews: GraphAndNetwork, Visualization
49
+URL: https://github.com/kasperdanielhansen/Rgraphviz
45 50
new file mode 100644
... ...
@@ -0,0 +1,48 @@
1
+---
2
+title: "Test plots for Rgraphviz"
3
+author: "Kasper D. Hansen"
4
+date: "`r doc_date()`"
5
+package: "`r pkg_ver('BiocStyle')`"
6
+abstract: >
7
+  Test
8
+vignette: >
9
+  %\VignetteIndexEntry{Bioconductor style for HTML documents}
10
+  %\VignetteEngine{knitr::rmarkdown}
11
+  %\VignetteEncoding{UTF-8}
12
+output: 
13
+  BiocStyle::html_document
14
+---
15
+
16
+# Introduction
17
+
18
+This vignette is intended for testing purposes for the `r Biocpkg("Rgraphviz")` package.  Unfortunately, we still do not have a great way to test graphics output.
19
+
20
+```{r library}
21
+library(Rgraphviz)
22
+```
23
+
24
+# Test cases
25
+
26
+## Example 1
27
+
28
+```{r graph1}
29
+set.seed(123)
30
+V <- letters[1:10]
31
+M <- 1:4
32
+g1 <- randomGraph(V, M, 0.2)
33
+```
34
+
35
+```{r plo1,plot=TRUE}
36
+nodes(g1) <- paste0(nodes(g1), "\nX")
37
+plot(g1)
38
+```
39
+
40
+
41
+# Session info
42
+
43
+Here is the output of `sessionInfo()` on the system on which this
44
+document was compiled:
45
+
46
+```{r sessionInfo, echo=FALSE}
47
+sessionInfo()
48
+```