[R] using the sink() function in a for-look
Rolf Turner
r.turner at auckland.ac.nz
Thu May 1 05:19:52 CEST 2008
On 1/05/2008, at 2:32 PM, Tony Dell wrote:
> hi all,
>
> i wanted to use the sink function to sequentially output regression
> summaries within a for-loop. i must have something wrong somewhere
> (or be
> using the sink function incorrectly), but can anyone help?
<snip>
You need to ***print*** the output you want to see.
Typing ``x'' in an interactive environment causes the value of
x to be printed. But in a non-interactive environment (inside
a function such as source() or a for loop) it doesn't, and
you need to say ``print(x)''.
Trap for young players.
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
More information about the R-help
mailing list