Add the toWrite functions to the NAMESPACE, so they can be accessed from outside the package. I am using them in the code to interface jjm and FLR.
Change the call to scan used to get the model name. By scan the first two lines only it failed on model files exported using writeJJM, which separates ctl file name and model name in two lines, unlike some of the example files in https://github.com/SPRFMO/jjm. In those the file and model names are on the same line, with no comment between them. Both options still depend on comment lines being there. But at least this way readJJM handles well files written by writeJJM. Tested with two files only, assuming others will share this structure.
These commits: