[R] setting history file

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Sep 10 18:54:06 CEST 2008


On Wed, 10 Sep 2008, Edna Bell wrote:

> Dear R Gurus:
>
> I would like to set the number of commands in the history file as 50
> rather than 25.

It is neither of those.  That is the default value of max.show, not of the 
size of the file.

> I would do this in the .First function.
>
> How do I set this, please?  I tried
> history(max=50)
> and it prints what it has.

Yes, but that is the number shown, not the number saved.

You failed to follow the posting guide and tell us *anything* about your 
OS etc.  But probably ?history tells you how to set the size of the 
history file via environment variable R_HISTSIZE.

> I just want to set the size in .First.
>
> Thanks in advance,
> Sincerely,
> Edna
>
> ______________________________________________
> 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.

PLEASE do.


-- 
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