Skip to content

Commit

Permalink
fix: Check note on DiagrammeR dependency in vignette V05
Browse files Browse the repository at this point in the history
Also clean doc of plot.GRiwrm
  • Loading branch information
David committed Jul 31, 2024
1 parent dd845ad commit a8cf6df
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
6 changes: 1 addition & 5 deletions R/plot.GRiwrm.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Display of a diagram representing the network structure of a GRiwrm object
#' Plot of a diagram representing the network structure of a GRiwrm object
#'
#' @param x \[GRiwrm object\] data to display. See [CreateGRiwrm] for details
#' @param display [logical] if `TRUE` plots the diagram, returns the mermaid code otherwise
Expand All @@ -11,9 +11,6 @@
#' @param footer mermaid script to add after the generated script
#' @param ... further parameters passed to [mermaid]
#'
#' @details This function only works inside RStudio because the HTMLwidget produced by DiagrammeR
#' is not handled on some platforms
#'
#' @return Mermaid code of the diagram if display is `FALSE`, otherwise the function returns the diagram itself.
#'
#' @export plot.GRiwrm
Expand Down Expand Up @@ -261,7 +258,6 @@ mermaid_gen_link <- function(diagram, theme = "default", format = "png", server
#' @source From https://stackoverflow.com/a/28729601/5300212
#' @param path Path of the file
#' @param add [logical] Add the image to the existing plot
#' @param pic output of
#'
#' @return Nothing, used to side effect.
#' @noRd
Expand Down
8 changes: 2 additions & 6 deletions man/plot.GRiwrm.Rd

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

9 changes: 1 addition & 8 deletions vignettes/V05_Modelling_ungauged_nodes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ Using the study case of the vignette #1 and #2, we considere this time that node
hydrological parameters of the gauged node `54032`.

```{r network, echo = FALSE}
mmd <- function(x, ...) {
# For avoiding crash of R CMD build in console mode
if (Sys.getenv("RSTUDIO") == "1") {
DiagrammeR::mermaid(x, ...)
}
}
mmd("
plot.mermaid("
graph LR
id95[54095]
id01[54001]
Expand Down

0 comments on commit a8cf6df

Please sign in to comment.