[R] How to show help in the same mode as where the commands is input?

Peng Yu pengyu.ut at gmail.com
Thu Aug 6 21:34:42 CEST 2009


It freezes at the last line. Do you know why?

> dump.pager <- function( files, ...){
+        cat( readLines( files ), sep = "\n" )
+ }
> options( pager = dump.pager )
> help(ls)
Help on topic 'ls' was found in the following packages:

  Package               Library
  AnnotationDbi         /home/pengy/utility/R
  base                  /usr/local/lib64/R/library

Loading Tcl/Tk interface ... done


On Aug 6, 2:25 pm, Romain Francois <romain.franc... at dbmail.com> wrote:
> Hi,
>
> You can define your own pager:
>
> Something like this might do what you want:
>
> dump.pager <- function( files, ...){
>         cat( readLines( files ), sep = "\n" )}
>
> options( pager = dump.pager )
>
> Romain
>
> On 08/06/2009 08:59 PM, Peng Yu wrote:
>
> > Hi,
>
> > In R command line, when I type "help(something)", it will always show
> > the help in the different mode such that I don't see command lines
> > anymore but just the help document. If I quit from the help mode, I
> > will only see the command lines by not the help document.
>
> > I would like the help document and command lines be show in the same
> > mode. I'm wondering how to do so.
>
> > Regards,
> > Peng
>
> --
> Romain Francois
> Professional R Enthusiast
> +33(0) 6 28 91 30 30http://romainfrancois.blog.free.fr
> |-http://tr.im/vzip: Code Snippet : List of CRAN packages
> |-http://tr.im/vsK1: R parser package on CRAN
> `-http://tr.im/vshK: Transfer files through Rserve
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list