annotate index.Rmd @ 1:c8c0b708c221 draft

planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b-dirty
author mingchen0919
date Tue, 01 May 2018 11:07:53 -0400
parents c12e291895ff
children 071638eddf9c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
1
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
2
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
3 ```{css echo=FALSE}
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
4 # code chunks scrollable
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
5 pre code, pre, code {
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
6 white-space: pre !important;
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
7 overflow-x: scroll !important;
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
8 word-break: keep-all !important;
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
9 word-wrap: initial !important;
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
10 }
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
11 ```
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
12
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
13
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
14 ```{r, echo=FALSE}
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
15 # to make the css theme to work, <link></link> tags cannot be added directly
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
16 # as <script></script> tags as below.
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
17 # it has to be added using a code chunk with the htmltool functions!!!
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
18 css_link = tags$link()
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
19 css_link$attribs = list(rel="stylesheet", href="vakata-jstree-3.3.5/dist/themes/default/style.min.css")
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
20 css_link
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
21 ```
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
22
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
23 ```{r, eval=FALSE, echo=FALSE}
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
24 # this code chunk is purely for adding comments
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
25 # below is to add jQuery and jstree javascripts
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
26 ```
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
27 <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
28 <script src="vakata-jstree-3.3.5/dist/jstree.min.js"></script>
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
29
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
30 ```{r, eval=FALSE, echo=FALSE}
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
31 # this code chunk is purely for adding comments
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
32 # javascript code below is to build the file tree interface
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
33 # see this for how to implement opening hyperlink: https://stackoverflow.com/questions/18611317/how-to-get-i-get-leaf-nodes-in-jstree-to-open-their-hyperlink-when-clicked-when
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
34 ```
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
35 <script>
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
36 $(function () {
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
37 // create an instance when the DOM is ready
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
38 $('#jstree').jstree().bind("select_node.jstree", function (e, data) {
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
39 window.open( data.node.a_attr.href, data.node.a_attr.target )
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
40 });
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
41 });
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
42 </script>
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
43
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
44 ## Outputs
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
45
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
46 ```{r, echo=FALSE}
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
47 # create a div container to store the file tree interface
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
48 library(htmltools)
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
49 tags$div(
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
50 id="jstree",
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
51 file_tree(Sys.getenv('REPORT_FILES_PATH'))
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
52 )
c12e291895ff planemo upload commit 104ae24ee30761a0099eeb91362ed1e3e13aba4b
mingchen0919
parents:
diff changeset
53 ```