Replaces part of the Mplus code, runs it, and reads it in. Facilitates repeated running with a small change in input. Good for testing the effects of particular analyses.
Arguments
- inp
Input file path.
- target
Character. Block of Mplus code to replace.
- replacement
Character. Mplus code to replace the target. Can be a vector - in this case, multiple outputs will be created.
- run
Whether new input files should be executed. When FALSE, returns a vector of paths to the new input files.
- read
Logical, whether read the models in. When FALSE, returns the list of paths to output files.
- keep.files
Logical. Whether input and output files shuld be kept on disk. When FALSE, all Mplus files are deleted and read in wish readModels.