cannot open connection errors
are vague (i.e., when a source script can't be found)Error: syntax error in line 7 near 'answer'
: For the B4W > svy/3-flags.R. It occurs in a tibble::tribble()
in lines 29 to 47What do you really want from the interactivity? Probably the quickest way to get there is with Shiny, worth prototyping there at least
I think the most straightforward way to deal with if/else is the Schrodinger's cat approach. Treat assignments in conditional states as a single entity:
# Expression 1
a <- "..."
# Expression 2
if (...) {
b <- f(a)
c <- g(b)
} else {
b <- f2(a)
c <- g2(b)
}
# Expression 3
d <- h(b, c)
The above will have 4 nodes: a -> b -> c -> d
. The code displayed for the b node:
if (...) {
b <- f(a)
} else {
b <- f2(a)
}
This isn't going to do a great job of addressing assymetrical effects though, so we would need something more in such cases:
if (...) {
saveRDS(b)
} else {
saveRDS(c)
}
The above will produce 2 nodes. The code for b | saveRDS
:
if (...) {
saveRDS(b)
}
knitr::opts_chunk$set()
. Probably want to exclude theseedges_to_dot()
: converting parsed/dependencies to a useful format (e.g., dotfile)|>
in tooltips (instead of using the parsed representation which converts to nested functions)[ ] lines from the file would improve my ability to use the graph alongside the code
[ ] (maybe) an alternative option (or default approach) to propagating function globals b/c it can introduce a spaghetti-looking effect when a function is run multiple times (e.g., when only one argument varies across runs). Maybe it would be more useful to show globally-assigned functions in their own track with their dependencies specified. Note that this situation happens with the nc lifetime analysis script:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.