[R] history and readline, Mac OSX
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Oct 17 16:29:21 CEST 2012
On 17/10/2012 14:39, Christian Hoffmann wrote:
> Hi,
>
> Obviously history() will only work with readline installed: so far I
Not obvious, and not what the help page says either:
There are several history mechanisms available for the different R
consoles, which work in similar but not identical ways. Other
uses of R, in particular embedded uses, may have no history. The
functions described here work under the ‘readline’ command-line
interface but may not otherwise (for example, in batch use or in
an embedded application).
> have not been able to find working advice for installing and enabling
> readline on MacOSX.
It's part of the build process, and described in the 'R Installation and
Administration Manual' and the RMacOSX-FAQ. But the CRAN binary is
built against a static version of readline, and does work.
>
> > sessionInfo()
> R version 2.15.1 (2012-06-22)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C
>
> attached base packages:
> [1] tools tcltk stats4 splines parallel datasets compiler
> [8] graphics grDevices stats grid utils methods base
>
> other attached packages:
> [1] survival_2.36-14 spatial_7.3-3 rpart_3.1-53 nnet_7.3-1
> [5] nlme_3.1-104 mgcv_1.7-18 foreign_0.8-50 codetools_0.2-8
> [9] cluster_1.14.2 class_7.3-3 boot_1.3-4 Matrix_1.0-6
> [13] MASS_7.3-18 KernSmooth_2.23-7 cwhmisc_3.0 lattice_0.20-6
> >
>
> Who is willing to give me advice?
Download the .pkg from CRAN.
Install it.
Use R in a Terminal window.
What did you do other than the obvious? If for example you are using
R.app you need to tell us, as readline applies to 'R' as run in a
Terminal window.
history() depends on savehistory(), and there *are* non-readline
implementations of that, including in RGui on Windows. Maybe you are
expecting it to work in R.app, where savehistory() seems currently not
to be implemented (although traces in the sources suggest it once was
and could fairly easily be added by someone who speaks Objective-C).
But R.app *is* an 'embedded use' from the quote above.
>
> TIA -- Christian
>
--
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