Re: [R] using the sink() function in a for-look

From: Tony Dell <anthony.dell_at_jcu.edu.au>
Date: Thu, 01 May 2008 14:59:38 +1000

bingo. thanks Ralph.


tony dell
department of marine and tropical biology james cook university
townsville, qld 4811 australia

[p] 07 47815751 or 47814520
[e] anthony.dell_at_jcu.edu.au 
[skype] anphony

-----Original Message-----
From: Rolf Turner [mailto:r.turner_at_auckland.ac.nz] Sent: Thursday, 1 May 2008 1:20 PM
To: Tony Dell
Cc: r-help_at_r-project.org
Subject: Re: [R] using the sink() function in a for-look

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:21}}

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 01 May 2008 - 05:02:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 01 May 2008 - 05:30:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive