[19368] in s-news-athena

home help back first fref pref prev next nref lref last post

RE: [S] creating a log or diary file in S-PLUS

daemon@ATHENA.MIT.EDU (David Smith)
Fri Oct 1 05:18:26 1999

Message-Id: <5FD4320911EDD21194CB00C04F8EEB1B087864@tech_1.mathsoft.co.uk>
From: dsmith@mathsoft.co.uk (David Smith)
To: "'aczarn@cs.uwa.edu.au'" <aczarn@cs.uwa.edu.au>
Cc: "S-News (E-mail)" <s-news@wubios.wustl.edu>
Date: Fri, 1 Oct 1999 10:12:00 +0100 
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"


With the Unix version of S-PLUS, there are several ways to get a transcript
(i.e. a file of all the input to and output from S-PLUS).  Some suggestions,
in order of desirability:

1. Run S-PLUS within emacs, and save the buffer S-PLUS is running in.  ESS
(http://www.stat.math.ethz.ch/ESS/) has lots of useful features for running
S-PLUS in emacs, and for editing transcripts.

2. Use the "script" command.  This isn't available on all versions of Unix,
but if you have it, just run it before you start S-PLUS, and press control-D
from the shell to close the script after quitting S-PLUS.

	% script
	Script started, file is typescript
	% Splus
	...
	> q()
	% <control-D>
	Script done, file is typescript

The transcript can be found in the file "typescript".

3. Run S-PLUS in an x-term and either use a long scrollback buffer (xterm
-sb -sl 10000) and cut-and-paste, or turn on logging (from the
ctrl-leftmouse menu).

4. Inside S-PLUS, use 
	options(echo=T)
	sink("transcript")
   This last one is the least satisfactory, as you don't get to see the
S-PLUS output on the screen, and the transcript contains input and output
but no prompts to distinguish them.


On S-PLUS for Windows it's much easier -- just cut and paste from the
Commands window.  In order for this to be a comprehensive script, you should
also redirect output from script files to the commands window, with Options
| Text Output Routing.

Kind regards,
# David

--
David M Smith  (dsmith@mathsoft.co.uk)
Mathsoft International, Bagshot, UK
Tel +44 01276 452299 x212
Fax +44 01276 451224



> -----Original Message-----
> From: owner-s-news@wubios.wustl.edu
> [mailto:owner-s-news@wubios.wustl.edu]On Behalf Of 
> aczarn@cs.uwa.edu.au
> Sent: 30 September 1999 11:16
> To: s-news@wubios.wustl.edu
> Subject: [S] creating a log or diary file in S-PLUS
> 
> 
> 
> to anyone who can assist
> 
> i am new to using S-PLUS, and I am using S-PLUS
> version 3 under NT via X-cursion (an x-windows
> emulator).
> 
> what i want to be able to do is to create a log file
> of all that appears in my working window, so that
> i can save it for future reference at a later time.
> 
> i have read right through the S-PLUS users manual but
> cannot find any reference to doing this.
> 
> i have tried the basic UNIX redirect by typing
> Splus > output.txt   however the problem is that
> the Splus commands appear in my window, but the output
> data does not! it goes to junk.txt
> 
> anyone's assistance would be greatly appreciated.
> 
> Dr Andrew Czarn
> 
> --------------------------------------------------------------
> ---------
> This message was distributed by s-news@wubios.wustl.edu.  To 
> unsubscribe
> send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
> message:  unsubscribe s-news
> 
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

home help back first fref pref prev next nref lref last post