Skip to content

Commit

Permalink
renamed shinyapp function to be package specific and added namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelso committed Jul 1, 2024
1 parent 2487b42 commit be3ee6c
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 4 deletions.
13 changes: 13 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@ License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Imports:
bslib,
dplyr,
ggplot2,
purrr,
readr,
readxl,
rlang,
shiny,
shinyjs,
shinyWidgets,
stringr,
tidyselect
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(shiny_run_speval)
import(bslib)
import(shiny)
6 changes: 3 additions & 3 deletions R/shiny_run_app.R → R/shiny_run_speval.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @description Starts a R Shiny application that let users upload a list of species names,
#' check them for typos and validate them against several major taxonomic backbones.
#'
#' @param ... arguments to pass to shinyApp
#' @param ... arguments to pass to `shinyApp()`
#'
#' @import shiny
#' @import bslib
Expand All @@ -12,12 +12,12 @@
#' @examples
#' if (interactive()) {
#'
#' shiny_run_MCredd()
#' shiny_run_speval()
#'
#' }
#'
#' @export
shiny_run_app <- function(...) {
shiny_run_speval <- function(...) {

## GLOBAL ####################################################################
## Initiate translation
Expand Down
2 changes: 1 addition & 1 deletion app.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Or use the blue button on top of this file

pkgload::load_all(export_all = FALSE, helpers = FALSE, attach_testthat = FALSE)
speval::shiny_run_app()
speval::shiny_run_speval()
23 changes: 23 additions & 0 deletions man/shiny_run_speval.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions pkg-creation-process.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,50 @@ The skeleton includes scripts for shiny modules and translation out of the box i

- images, translation and other files useful for the app.

## Add packages dependencies to DESCRIPTION

```{r}
## Data analysis
#usethis::use_package("magrittr")
usethis::use_package("readr")
usethis::use_package("tidyselect")
usethis::use_package("dplyr")
usethis::use_package("ggplot2")
#usethis::use_package("tibble")
#usethis::use_package("forcats")
usethis::use_package("purrr")
usethis::use_package("stringr")
usethis::use_package("rlang")
# usethis::use_package("tidyverse", type = "depends")
usethis::use_package("readxl")
## Shiny
usethis::use_package("shiny")
usethis::use_package("shinyjs")
usethis::use_package("shinyWidgets")
usethis::use_package("bslib")
## Geospatial
# usethis::use_package("sf")
# usethis::use_package("terra")
# usethis::use_package("units")
```

## Document, load and test

```{r}
devtools::document()
devtools::load_all()
shiny_run_speval()
## and / or
devtools::install()
library(speval)
shiny_run_speval()
```

------------------------------------------------------------------------

## Quarto
Expand Down

0 comments on commit be3ee6c

Please sign in to comment.