Hello,
I have this script in my PATH :
<file>
#!/bin/env Rscript
args <- commandArgs( TRUE )
if( length( args ) == 1 ){
h <- help( args )
} else if( length(args) == 2 ) {
h <- help( args[2] , package = args[1] )
} else{
stop( "usage: rman [package] function\n" )
}
system( sprintf( "less %s", h[1] ) )
</file>
which I can call like this:
$ rman rnorm
$ rman lattice xyplot
HTH,
Romain
Message du : 11/08/2009
De : "Peng Yu"
A : r-help@stat.math.ethz.ch
Copie à :
Objet : [R] R help from command line
Hi,
I frequently need to open multiple help pages in R, which requires the
start of multiple R sessions. I am wondering if there is a way to
invoke the help page from the command line just like 'man'.
Regards,
Peng
______________________________________________
R-help@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.
[[alternative HTML version deleted]]