I read the documentation on batch and diary functions, but I could not find the answer. I have a function, longjob(n), which needs to be run for many n values, which are recorded in nVector. I would like to record the output to the screen for each run.
Right now, I'm typing many lines:
diary(someJob1) >> job1out.txt
diary(someJob2) >> job2out.txt
diary(someJob3) >> job3out.txt
Question: How do I put this in a for loop without using eval? I am not sure how to create a job vector.