[R] Program Saving
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Nov 13 22:13:19 CET 2003
I think you are looking for savehistory(), or the equivalent on the menus
under GUI systems.
But, R is a program, and although I think you mean a section of R code, I
do not know exactly what you intend `program'to mean. If you mean a
function, see dump().
On Thu, 13 Nov 2003, Marc-Antoine Vaillant wrote:
> I have a very simple question. If a want to save a whole program (say
> more than 5 command lines), how can I proceed without each time using
> the command history (that allow me to recall previously saved command,
> but which is to long if you want to recall more than 5 command lines),
> or without saving to a text file and use copy/paste when I open a new R
> session (but in fact this doesn't work since when you copy your program
> to a text file, you copy the "<" or the "+" , and when you paste it back
> to a new R command sheet, you get syntax error since you now have double
> "<" (<<) and double "+" (++) at each line.
>
> Do they have something simple like in any other program, that consist of
> saving the command sheet under say Program X. Program X will become a
> simple file that I can reopened any time I want and each time I open it,
> I will have in front of me all the previous saved command, (including
> error, I don't care), in order that I don't have to recall anything when
> the program X is opened.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list