You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reintroduces prune support, which had been removed prior to the 0.1.3 release. flametree_grow() gains a prune argument: a spark function (like seg_col, seg_wid, shift_x, and shift_y) that controls the probability that a given shoot stops growing early. The default, spark_nothing(), disables pruning and reproduces prior behaviour exactly. Pruned shoots keep the segment they already grew, and that segment is marked as a leaf (id_leaf), but it produces no further descendants. Also relaxes split to allow a value of 1, which disables branching altogether and produces a single winding path per tree (#19).
ft__check_colour() now validates that the background and palette arguments to flametree_plot() are colours that R actually recognises (via grDevices::col2rgb()), rather than only checking that they are character vectors. Invalid colours (e.g. "##f6b6a6") now throw an informative error from flametree_plot() itself, rather than failing deep inside grid graphics code (#17).
flametree_grow() now warns when the requested time, split, and trees combination is expected to produce a very large data frame (row count grows as trees * split ^ time), since this was the most common cause of "cannot allocate vector" memory errors (#18).
Adds two more missing input validation checks: flametree_grow()'s trees argument (previously unchecked entirely, so e.g. trees = 2.5 silently misbehaved and other invalid input failed with cryptic low-level errors), and flametree_save()'s plot argument (previously, passing anything other than a ggplot object either failed with a cryptic error or, in the case of plot = NULL, silently saved an unrelated plot via ggplot2::last_plot() instead of erroring).
Switches all internal code, @examples, README.Rmd, and vignettes to use the base R native pipe |> instead of the magrittr pipe %>%, and adds Depends: R (>= 4.1.0) accordingly. The %>% operator re-exported from magrittr is unaffected and still available for backward compatibility.
Rewords the Description field in DESCRIPTION: the growth algorithm is a stochastic branching process, not a formal L-system (which implies a deterministic rewriting grammar), so the earlier description was technically misleading. Also fixes a grammatical mismatch in the same field ("generating the data structures and visualise them" → "...and visualising them").
Sets up spell checking for the package documentation, using the spelling package. Sets Language: en-GB in DESCRIPTION (the package consistently uses British spellings such as "colour" and "visualise"), and adds an inst/WORDLIST of accepted technical terms. Along the way, fixes a handful of genuine typos found by the spell check: "tesselation" → "tessellation", "wdith" → "width", and "abranching" → "a branching" (in flametree_plot() and flametree_grow()'s documentation).
Further documentation clarity pass: fixes a copy-paste error in the @param y description for the sparks functions (previously said "horizontal" for both x and y); removes a stray backtick in flametree_grow()'s @return docs; documents that flametree_plot(style = "themegray") also accepts the British spelling "themegrey"; updates a stale comment in checks.R that referred to prune as removed, when it has since been reintroduced; and, in the vignettes, mentions the prune spark argument (previously omitted) and fixes a couple more typos ("wheras", a missing article, and another instance of "tesselation") that weren't caught by the spell check because vignettes are currently excluded from it.