How tomaztk/useless_r_functions works
Purpose and shape
UUR is a loose collection of independently runnable R scripts containing “useful yet useless” functions, visualizations, puzzles, games, and data utilities. It is not an R package or a unified application: users clone the repo, source/select a script, and invoke its exported-in-script function(s). Primary implementation surface: functions/.
Entry points and execution model
There is no central launcher, package manifest, or shared module layer. Each R file is effectively an entry point, typically defining and sometimes executing a feature. Representative direct-use scripts include functions/Friday13.R, functions/DataFrameMaker.R, and functions/InteractiveVoronoiGraphGenerator.R. The README’s expected flow is interactive R/RStudio usage: load a script, then call a function such as IsItFriday13().
Core function families
The repository is organized by feature rather than architectural tiers:
• Text, randomization, and conversion utilities: functions/LoremIpsum.R, functions/WackyPasswordGenerator.R, functions/Convert_text_to_numbers.R.
• Data-frame/statistical operations and interoperability: functions/Stats_fun.R, functions/FromSQLtodplyr.R, functions/R_dataFrame_to_Python_Dataframe.R.
• Algorithms and mathematical explorations: functions/KadaneAlgorithm.R, functions/Knapsack.R, functions/Goldbach_conjecture.R.
• Games and interactive exercises: functions/RockPaperScissors.R, functions/MastermindGame.R, functions/LearningIrregularVerbs.R.
• Generative graphics, plotting, and animation: functions/MandelbrotSet.R, functions/AnimatingProbabilityPlots.R, functions/climate_spiral.R.
Visualization and desktop boundary
Many scripts generate console output, base-R plots, ggplot graphics, animations, or desktop-interactive displays. OS/display coupling is material: the README explicitly flags x11() portability, and interactive/clock features appear in functions/InteractiveVoronoiGraphGenerator.R, functions/AnalogClock.R, and functions/BigDigitalClock.R. Outputs are generally ephemeral plots/windows rather than a persisted product pipeline.
Data, image, and external-system boundaries
Most functions operate on caller-provided values, local files, or built-in R datasets. Image-oriented features bridge filesystem image inputs to plotting/data representations, e.g. functions/MakingScatterPlotFromImage.R, functions/Generating_image.R, and functions/ASCII_image.R. Specialized integration scripts introduce optional external boundaries: SQL examples in functions/SQL_R.R and functions/MergeR_SQLJoin.R; HTTP/API-oriented utilities in functions/Useless_API.R and functions/ShortenURL.R; Python-related support in functions/R_dataFrame_to_Python_Dataframe.R and functions/iris_py.py.
Service/API path
A small, separate API-oriented cluster exists rather than a repository-wide backend: functions/plumber.R, functions/run_api.r, and functions/Call_StatsfunR.R. This suggests an optional Plumber-hosted route for exposing statistical functionality, with Stats_fun.R as the likely callable domain script. Treat this as an isolated runtime path; it does not organize the rest of the scripts.
Assets, examples, and delivery
Standalone examples outside functions/ include Voronoi_map_of_europe.R and figure-generation scripts under figures/, such as figures/Collatz_Conjecture.R. figures/ and image/ are supporting visual assets/output context, not an application frontend. GitHub Actions exists at .github/workflows/main.yml, but the supplied tree/README establish no formal test suite, package build, deployment target, database, or mandatory cloud service.
Main entry points: Stats_fun.R Data operations · LoremIpsum.R Text and random utilities · MakingScatterPlotFromImage.R Image utilities · plumber.R Plumber routes
Components 20
Standalone R scripts
Independently sourced feature scripts under functions/.
- Feature script collection · No shared launcher, package, or module layer.
- Friday 13 utility
functions/Friday13.R - Text and random utilities
functions/LoremIpsum.R - Data operations · Statistical and data-frame transformations.
functions/Stats_fun.R - Algorithms and math
functions/KadaneAlgorithm.R - Games and exercises
functions/RockPaperScissors.R - Generative graphics
functions/MandelbrotSet.R - Desktop interactive displays · May depend on x11() or local display support.
functions/InteractiveVoronoiGraphGenerator.R - Image utilities · Convert local images into plots or representations.
functions/MakingScatterPlotFromImage.R
Optional API runtime
Separate Plumber-based path for statistics.
- Plumber routes · Optional routes exposing statistical functions.
functions/plumber.R - API runner
functions/run_api.r - Statistics API caller
functions/Call_StatsfunR.R
External boundaries
Optional system and data integrations.
- Caller values and local files
- SQL systems · Optional SQL examples and joins.
functions/SQL_R.R - HTTP and URL APIs · Optional API-oriented utilities.
functions/Useless_API.R - Python interoperability
functions/R_dataFrame_to_Python_Dataframe.R
Other components
- R / RStudio user · Sources a selected script and calls its functions.
- Ephemeral plots and windows · Base R, ggplot, animation, and desktop display output.
- Examples and figure assets · Standalone examples and visual output context.
figures/Collatz_Conjecture.R - GitHub Actions · Repository automation; no formal delivery pipeline is established.
.github/workflows/main.yml
Connections 22
- R / RStudio user → Feature script collection: sources selected script
- Feature script collection → Friday 13 utility: includes
- Feature script collection → Text and random utilities: includes
- Feature script collection → Data operations: includes
- Feature script collection → Algorithms and math: includes
- Feature script collection → Games and exercises: includes
- Feature script collection → Generative graphics: includes
- Feature script collection → Desktop interactive displays: includes
- Feature script collection → Image utilities: includes
- Text and random utilities → Caller values and local files: uses values
- Data operations → Caller values and local files: transforms
- Image utilities → Caller values and local files: reads images
- Generative graphics → Ephemeral plots and windows: renders
- Desktop interactive displays → Ephemeral plots and windows: opens display
- Image utilities → Ephemeral plots and windows: renders
- Data operations → SQL systems: optional queries
- Text and random utilities → HTTP and URL APIs: optional requests
- Data operations → Python interoperability: exports data frames
- API runner → Plumber routes: hosts
- Plumber routes → Data operations: exposes statistics
- Statistics API caller → Plumber routes: calls
- Examples and figure assets → Ephemeral plots and windows: produces figures