-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_shiny_pkg.Rmd
More file actions
98 lines (67 loc) · 3.29 KB
/
create_shiny_pkg.Rmd
File metadata and controls
98 lines (67 loc) · 3.29 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# NewShinyPackage
<!-- badges: start -->
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://CRAN.R-project.org/package=NewShinyPackage)
[](https://github.com/JRaviLab/NewShinyPackage/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The goal of NewShinyPackage is to ... < *your awesome package description here!* >
## GitHub Setup
### Repository
Initial Repository Configuration:
* Enable Git: `usethis::use_git()`
* Configure Remote: `usethis::use_github(organisation = "JRaviLab", private = TRUE, protocol = "https")`
* Contributor Code of Conduct: `usethis::use_code_of_conduct(contact = "janani.ravi@cuanschutz.edu")`
### GitHub Actions
These functions will enable common package development GitHub Actions is desired:
* R CMD Check (multiplatform): `usethis::use_github_action("check_standard")`
* Build Pkgdown: `use_github_action("pkgdown")`
* lint code: `use_github_action("lint")`
* style code: `use_github_action("style")`
Example GitHub Actions workflows have been incorporated into this template. Modify workflows in `.github/workflows/` or delete if these are not required.
## Development
Some initial guidance on developing a Shiny Application can be found in the top level `dev` folder. Step through the included .R files, beginning with `01_start.R`
* new function: `usethis::use_r("hello")`
* new shiny module: `golem::add_module()`
* add package dependency: `usethis::use_package("rlang")`
* render documentation/update NAMESPACE: `devtools::document()`
* load changes without install: `devtools::load_all()`
* Local R CMD Check: `devtools::check()`
* Test App: `NewShinyPackage::run_app()`
## Installation
You can install the development version of NewShinyPackage like so:
``` r
# GitHub
devtools::install_github("JRaviLab/NewShinyPackage", auth_token = "<PersonalAccessToken>")
# If Bioconductor Dependencies
BiocManager::install("JRaviLab/NewShinyPackage", auth_token = "<PersonalAccessToken>")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example, eval=FALSE}
library(NewShinyPackage)
## basic example code
```
What is special about using `README.Rmd` instead of just `README.md`? You can include R chunks like so:
```{r cars}
summary(cars)
```
You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. `devtools::build_readme()` is handy for this.
You can also embed plots, for example:
```{r pressure, echo = FALSE}
plot(pressure)
```
In that case, don't forget to commit and push the resulting figure files, so they display on GitHub and CRAN.
## Code of Conduct
Please note that the NewShinyPackage project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.