[R] Writing output to a file in a loop

2005-02-10 Thread Wojtek Slusarski
Hello, My problem is, that I have to build hundreds of GARCH models to obtain volatility forecasts. I would like to run a loop, that would build those forecasts for me. There is no problem, with writing only the results of the forecasts, but I'd like to have stored results of the models in some

Re: [R] Writing output to a file in a loop

2005-02-10 Thread Roger Bivand
On Thu, 10 Feb 2005, Wojtek Slusarski wrote: Hello, My problem is, that I have to build hundreds of GARCH models to obtain volatility forecasts. I would like to run a loop, that would build those forecasts for me. There is no problem, with writing only the results of the forecasts, but

Re: [R] Writing output to a file in a loop

2005-02-10 Thread Wojtek Slusarski
Roger Bivand wrote: First, you should enclose the functions that output results in the loop in print(), so that they do print, in loops this has to be done and is a FAQ (often met with lattice graphics) I am sorry for that, that I didn't find that. Now it works great. If anyone needs that,

Re: [R] Writing output to a file in a loop

2005-02-10 Thread Miguel A. Arranz
That is correct, you have to specify with print or cat what you want to sink. This should work for you: print(summary(fit)) print(logLik(fit)) print(fcv) I hope this helps. On Thursday 10 February 2005 11:40, Wojtek Slusarski wrote: Hello, My problem is, that I have to build hundreds of