These scripts are years old and are in dire need of a good scrubbing.
[x] The main fractal functions (mandelbrot() and sandpile()) should provide an argument to control whether a color matrix is returned or just the results of the iterations.
[x] Put license info at the top of every script. See the bottom of the license file for the boilerplate.
[x] Review the code style.
[x] Limit line length to 80 characters. Change the margin in the RStudio options.
[x] No code execution at the top level.
[x] Separate overly long and complex functions into smaller ones.
[x] Improve the docstrings. Look up how other people do this.
[x] Look at the TODOs at the bottom of fractals.R
[x] Remove magic numbers where possible, e.g. the standard_limits list.
[x] Use TRUE and FALSE instead of T or F.
[x] Separate mandelbrot and julia set into their own functions and scripts.
[x] Remove source() and remember to never use it in a package.
[x] Always use on.exit() when modifying par().
[x] Give the functions better names.
[x] Take fractal_generation.R apart. Remove the unnecessary stuff and use the rest for examples in maybe a vignette or help files.
[x] Think about which functions to export. Only bother with argument checking and help pages on those.
These scripts are years old and are in dire need of a good scrubbing.
mandelbrot()
andsandpile()
) should provide an argument to control whether a color matrix is returned or just the results of the iterations.source()
and remember to never use it in a package.on.exit()
when modifyingpar()
.fractal_generation.R
apart. Remove the unnecessary stuff and use the rest for examples in maybe a vignette or help files.