-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
65 lines (48 loc) · 1.37 KB
/
README.Rmd
File metadata and controls
65 lines (48 loc) · 1.37 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: newsfeed
output: github_document
---
```{r, include = FALSE}
knitr::opts_knit$set(
root.dir = file.path(Sys.getenv("HOME"), "github")
)
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
cache = TRUE,
out.width = "100%"
)
options(tibble.print_min = 5, tibble.print_max = 5)
```
Compile NEWS files from several packages
## Install and load
```{r,include=TRUE,results="hide",message=FALSE,warning=FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
if (!requireNamespace("newsfeed", quietly = TRUE))
BiocManager::install("waldronlab/newsfeed")
library(newsfeed)
```
## Optional packages
* clipr - allows the user to send the collection of NEWS files to the clipboard
* rmarkdown - when `render = TRUE` in `collect`, the package will show an HTML
page of NEWS updates
## Moving to the base packages directory
Users should move one level up from the package directory to be able
to find the NEWS files in the package:
```{r,eval=FALSE}
setwd("..")
```
In this case, when compiling the `Rmd` file, I move one level up.
## Compiling NEWS files
```{r}
collect("newsfeed", render = FALSE)
```
## Reading the NEWS
Here is how the NEWS collection would look if all NEWS files were written
in `NEWS.md` format:
```{r,results="asis",echo=FALSE}
cat(readLines(
collect("newsfeed", render = TRUE, raw = TRUE)
))
```