You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/make_compendium.R
+23-9Lines changed: 23 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
#' @param name character string: the research compendium directory name. No special characters should be used. Default is "research_compendium".
8
8
#' @param path Path to put the project directory in. Default is current directory.
9
9
#' @param force Logical controlling whether existing folders with the same name are used for setting the folder structure. The function will never overwrite existing files or folders.
10
-
#' @param format A character vector of length 1 with the name of the built-in compendiums available in the example object `compendiums` (see \code{\link{compendiums}} for available formats). Default is 'basic'. Alternatively, it can be a character vector with 2 or more elements with the names of the folders and subfolders to be included.
10
+
#' @param format A character vector of length 1 with the name of the built-in compendiums available in the example object `compendiums` (see \code{\link{compendiums}} for available formats). Default is 'basic'. Alternatively, it can be a character vector with 2 or more elements with the names of the folders and subfolders to be included (e.g. \code{c("folder_1", "folder_1/subfolder_1", "folder_1/subfolder_2")}).
11
11
#' @param packrat Logical to control if packrat is initialized (\code{packrat::init()}) when creating the compendium. Default is \code{FALSE}.
12
12
#' @param git Logical to control if a git repository is initialized (\code{git2r::init()}) when creating the compendium. Default is \code{FALSE}.
13
13
#' @param clone Path to a directory containing a folder structure to be cloned. Default is \code{NULL}. If provided 'format' is ignored. Folders starting with \code{^\\.git|^\.Rproj.user|^\\.\\.Rcheck} will be ignored.
@@ -21,8 +21,14 @@
21
21
#' @examples {
22
22
#' data(compendiums)
23
23
#'
24
-
#'make_compendium(name = "mycompendium", path = tempdir(), format = "basic",
24
+
#' # default format
25
+
#' make_compendium(name = "mycompendium", path = tempdir(), format = "basic",
cat("\nSource code and data found at [", url, "](", url, ")", sep = "")
38
42
}
39
43
@@ -52,37 +56,33 @@ knitr::opts_chunk$set(
52
56
53
57
```
54
58
55
-
56
59
<!-- skyblue box -->
57
60
58
61
::: {.alert .alert-info}
59
-
60
62
# Purpose {.unnumbered .unlisted}
61
63
62
-
- The first goal of this report
63
-
64
-
- The second goal of this report
64
+
- The first goal of this report
65
65
66
+
- The second goal of this report
66
67
:::
67
68
68
-
69
-
69
+
70
70
71
71
<!-- light brown box -->
72
-
::: {.alert .alert-warning}
73
72
73
+
::: {.alert .alert-warning}
74
74
# Report overview {.unnumbered .unlisted}
75
75
76
-
- You can have the sections listed here, for instance:
77
-
78
-
-[Lorem ipsum](#lorem-ipsum)
79
-
-[Takeaways](#takeaways)
76
+
- You can have the sections listed here, for instance:
80
77
78
+
-[Lorem ipsum](#lorem-ipsum)
79
+
-[Takeaways](#takeaways)
81
80
:::
82
81
83
-
82
+
84
83
85
84
# Analysis flowchart {.unnumbered .unlisted}
85
+
86
86
```{mermaid}
87
87
88
88
flowchart
@@ -91,14 +91,13 @@ flowchart
91
91
C --> D(Statistical analysis)
92
92
D --> E(Model summary)
93
93
94
-
style A fill:#44015466
95
-
style B fill:#3E4A894D
96
-
style C fill:#26828E4D
97
-
style D fill:#6DCD594D
94
+
style A fill:#382A5433
95
+
style B fill:#395D9C33
96
+
style C fill:#3497A933
97
+
style D fill:#60CEAC33
98
98
99
99
```
100
100
101
-
102
101
# Load packages {.unnumbered .unlisted}
103
102
104
103
```{r load packages}
@@ -119,9 +118,9 @@ a <- 1
119
118
b <- 2
120
119
```
121
120
122
-
# Lorem ipsum
121
+
# Lorem ipsum {#lorem-ipsum}
123
122
124
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in felis ut mauris consectetur sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nec ex neque. Nunc ultricies et ante ac feugiat. Nulla quam ex, viverra eget mollis non, porttitor nec ante. Donec non felis a nisi elementum consectetur tempor in mauris. Curabitur leo nunc, posuere in erat sit amet, varius aliquam mi. Nullam lacinia odio neque, et semper erat fermentum ut. Praesent mi massa, convallis in vehicula mattis, condimentum ac risus. In eget metus eget nunc pulvinar finibus. Proin nec tellus sed lorem malesuada aliquet sed laoreet augue.
123
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in felis ut mauris consectetur sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nec ex neque. Nunc ultricies et ante ac feugiat. Nulla quam ex, viverra eget mollis non, porttitor nec ante. Donec non felis a nisi elementum consectetur tempor in mauris. Curabitur leo nunc, posuere in erat sit amet, varius aliquam mi. Nullam lacinia odio neque, et semper erat fermentum ut. Praesent mi massa, convallis in vehicula mattis, condimentum ac risus. In eget metus eget nunc pulvinar finibus. Proin nec tellus sed lorem malesuada aliquet sed laoreet augue.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum in felis ut mauris consectetur sodales. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
0 commit comments