Hi All, I write simulation software in C/C++ for my research, and over the years I have collected and customized a lot of RNG techniques from people who work in that area. I've recently decided to port some of these methods over to R as a way to distribute them more broadly.
To start, I've ported my approach for initializing random number generators with variable-length input sequences. I call my package Ironseed, and I would appreciate any feedback from this group. URL: https://github.com/reedacartwright/ironseed The primary challenge that this package solves is to allow users to use arbitrary inputs for seeding their R scripts. This is particularly useful when someone is working with a large nested study, wants to specify seeds, and finds it easiest to pass multiple seeds to a script (e.g. nested for-loop arguments). ``` #!/usr/bin/env -S Rscript --vanilla # Seed with multiple values ironseed::ironseed("Experiment 1", 20251031, 1) # Or use commandline arguments ironseed::ironseed("Experiment 2", commandArgs(trailingOnly = TRUE)) # Or automatically generate a seed ironseed::ironseed(NULL) ``` Roughly speaking, Ironseed generates a 256-bit hash of all the inputs and then uses this hash to generate a sequence of seeds for R's built-in generator. More details are available on the Github site. This package is very new (written this week), and if anyone has any suggestions for improvements or notices something broken about it, please let me know. Cheers, Reed -- Reed A. Cartwright, PhD Associate Professor of Life Sciences TEACh Representative - Evolution and Computational Courses School of Life Sciences and The Biodesign Institute Arizona State University ================== Address: The Biodesign Institute, PO Box 876401, Tempe, AZ 85287-6401 USA Packages: The Biodesign Institute, 1001 S. McAllister Ave, Tempe, AZ 85287-6401 USA Office: Biodesign B-220C, 1-480-965-9949 Website: http://cartwrig.ht/ ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel