SETUP
This gem requires Ruby v2.3 or later to be installed on your system.
- On MacOS, Ruby comes pre-installed. Note: You can use the homebrew package manager from brew.sh if you want to install a newer version of Ruby which is noticeably faster than the one that currently ships with MacOS.
- Windows users should use one of the installer packages available from rubyinstaller.org. You will need to determine whether your have a 32 or 64 bit processor, and download the appropriate installer. We recommend Ruby v2.5.x or later, as it is substantially faster than prior versions. When running the installer, check the checkboxes to add the Ruby installation to your PATH and to associate
.rband.rbwfiles with Ruby. A terminal window will pop up during the installation—press "enter" to automatically install all of the required tools, and when prompted again (several minutes later) press "enter" again to end the installation.
You can check that Ruby is properly installed by opening Terminal.app (MacOS) or CMD.EXE (Windows) and typing ruby --version (note: two dashes). You should see a response telling you which version of Ruby you are running.
After your Ruby installation is confirmed you can install the data farming Ruby scripts by running the following command.
gem install datafarming
This assumes that you have a network connection. Additional dependencies will be installed automatically. On MacOS or Linux systems, you may be required to use the sudo command to to authenticate the installation. In that case, type sudo gem install datafarming and enter your password when prompted.
Gem installation only needs to be done once. If you explicitly downloaded the .gem file rather than using a network installation, you can delete it after performing the installation.
USAGE
Ruby is a powerful and concise object-oriented scripting language. Scripts are normally run from a command-line or terminal environment by typing the ruby command followed by a script name, often followed by one or more command-line arguments. However, scripts installed as gems do not need the ruby command to be typed explicitly. For example, typing stripheaderdups.rb my_file.txt will invoke the stripheaderdups.rb script and apply it to file my_file.txt in your current working directory. Note that on Windows the .rb suffix is not needed to run your scripts, e.g., stripheaderdups my_file.txt will suffice.
All scripts in this distribution are self documenting if run with a --help, -h, or -? option. Quick descriptions follow.
GENERAL FILE MANIPULATION SCRIPTS:
blank2csv.rb— converts whitespace-delimited files to Comma Separated Values (CSV) filescat.rb— Unix “cat” program work-alike for Windows—for viewing or creating text files or concatenating multiple files, based on stdioconvert_line_endings.rb— converts text files (including CSV files) to your current operating system environment (e.g., DOS to Unix or Unix to DOS)csv2blank.rb— converts CSV files to whitespace-delimited files
DATA FARMING RUBY SCRIPTS:
batchrunner.rb— run a model interactively with replicationrundesign_general.rb— run control to replicate a designed experiment with a modelpool_files.rb— pool columns from separate files into a new file, useful for combining design file & output files or multiple output filesscaled_fde.rb— generate fully orthogonal quadratic designs based on discrete Fourier frequencies, with factor scalingscaled_rf_cubed.rb— generate 2-level Resolution V fractional factorial designs and Central Composite Designs (CCDs), with factor scalingstack_nolhs.rb— generate designs by reassigning columns from built-in NOLHs, with factor scaling, for up to 100 factorsstripheaders.rb,stripheaderdups.rb— used to remove headers from a file, or duplicate headers within a file, respectivelyaugment_design.rb— generates star points to augment a fractional factorialcross.rb— creates a combinatorial design by crossing all combinations of any # of individual smaller designsmser.rb— uses MSER truncation to remove initial transient effects for time-series output, reports truncated average and number of observations for each run to facilitate construction of a properly weighted confidence interval.mser_nolbm.rb— uses MSER truncation to remove initial transient effects for time-series output, then calculates a 95% confidence interval on the remaining data using non-overlapping batch means.mser_olbm.rb— uses MSER truncation to remove initial transient effects for time-series output, then calculates a 95% confidence interval on the remaining data using overlapping batch means.