Skip to content

Commit

Permalink
sdmverse 0.1.0.9023: inst/scripts/ms_figs.R to examples sections
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainschmitt committed Oct 7, 2024
1 parent d3dce0e commit 8d35b76
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 132 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
sdmverse 0.1.0.9023

- inst/scripts/ms_figs.R to examples sections

sdmverse 0.1.0.9022

- app update with M. Noblis suggestions
Expand Down
53 changes: 17 additions & 36 deletions R/plot_dendrogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,27 @@ NULL
#'
#' @examples
#' \donttest{
#' # fetch data
#' table <- prep_table()
#'
#' # a rectangular dendrogram
#' rect <- plot_dendrogram(
#' table = table,
#' dist_method = "binary",
#' k = nrow(table),
#' k_colors = "jco",
#' rect = TRUE,
#' rect_border = "jco",
#' rect_fill = TRUE,
#' type = "rectangle",
#' library(dplyr)
#' d <- prep_table(where = "online") %>%
#' filter(
#' name != "rgbif",
#' name != "ibis.iSDM",
#' name != "dismo"
#' ) %>%
#' select(
#' -mod_mechanistic,
#' -mod_multispecies
#' )
#' plot_dendrogram(
#' d,
#' k = 5,
#' cex = 0.7,
#' diff_method = "binary",
#' horiz = TRUE,
#' main = "Species distribution modeling software",
#' sub = date(),
#' cex = 1.4
#' )
#'
#' # a phylogenic plot
#' phylo <- plot_dendrogram(
#' table = table,
#' dist_method = "binary",
#' k = nrow(table),
#' k_colors = "jco",
#' rect = TRUE,
#' rect_border = "jco",
#' type = "phylogenic",
#' repel = TRUE,
#' main = "Species distribution modeling software",
#' sub = date(),
#' cex = 1
#' main = ""
#' )
#' }
#'
#' \dontrun{
#' library(patchwork)
#' rect + phylo
#' }
#'
#' @export
#'
plot_dendrogram <- function(table,
Expand Down
16 changes: 13 additions & 3 deletions R/plot_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,19 @@ NULL
#' @return Plot package characteristics from the sdmverse table using ggplot.
#'
#' @examples
#' \dontrun{
#' prep_table() %>%
#' plot_table()
#' \donttest{
#' library(dplyr)
#' d <- prep_table(where = "online") %>%
#' filter(
#' name != "rgbif",
#' name != "ibis.iSDM",
#' name != "dismo"
#' ) %>%
#' select(
#' -mod_mechanistic,
#' -mod_multispecies
#' )
#' plot_table(d, remove_empty_cats = TRUE)
#' }
#'
#' @export
Expand Down
12 changes: 11 additions & 1 deletion R/prep_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ NULL
#'
#' @examples
#' \donttest{
#' prep_table()
#' library(dplyr)
#' d <- prep_table(where = "online") %>%
#' filter(
#' name != "rgbif",
#' name != "ibis.iSDM",
#' name != "dismo"
#' ) %>%
#' select(
#' -mod_mechanistic,
#' -mod_multispecies
#' )
#' }
#'
#' @export
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ account: sylvainschmitt
server: shinyapps.io
hostUrl: https://api.shinyapps.io/v1
appId: 8255748
bundleId: 9038005
bundleId: 9168398
url: https://sylvainschmitt.shinyapps.io/smdverse/
8 changes: 3 additions & 5 deletions inst/app/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ shinyServer(function(input, output) {
)
)
})
output$table <- DT::renderDataTable(
{
tab()
},
)
output$table <- DT::renderDataTable({
tab()
}, )
})
46 changes: 0 additions & 46 deletions inst/scripts/ms_figs.R

This file was deleted.

53 changes: 17 additions & 36 deletions man/plot_dendrogram.Rd

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

16 changes: 13 additions & 3 deletions man/plot_table.Rd

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

12 changes: 11 additions & 1 deletion man/prep_table.Rd

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

0 comments on commit 8d35b76

Please sign in to comment.