moodymudskipper / flow

View and Browse Code Using Flow Diagrams
https://moodymudskipper.github.io/flow/
Other
395 stars 26 forks source link

Typo in flow_view #82

Closed Lornebradia closed 2 years ago

Lornebradia commented 2 years ago

Hi, I've run into what it seems a trivial typo but it's pretty much bad in that it breaks the function, when using flow_view. Debugging the function, I find:

function (x, prefix = NULL, code = TRUE, narrow = FALSE, truncate = NULL, 
  nested_fun = NULL, swap = TRUE, out = NULL, engine = c("nomnoml", 
    "plantuml")) 
{
  engine = match.arg(engine)
  svg <- is.null(out) || endsWith(out, ".html") || endsWith(out, 
    ".html")
  f_chr <- deparse1(substitute(x))
  is_valid_named_list <- is.list(x) && length(x) == 1 && !is.null(names(x))
  if (is_valid_named_list) {
    f_chr <- names(x)
    x <- x[[1]]
  }

Shouldn't that deparse1(substitute(x)) be just deparse(substitute(x))?

Using version 0.0.2 from CRAN.

moodymudskipper commented 2 years ago

Hi,

deparse1() is a recentish function in R, you're probably using an older R version. This has been raised in the past https://github.com/moodymudskipper/flow/issues/68. If you install the development version of this package it should work fine.

Lornebradia commented 2 years ago

Will do, thanks

github-actions[bot] commented 1 year ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.