[R] echo output to screen

Liaw, Andy andy_liaw at merck.com
Thu Feb 9 12:13:11 CET 2006


Is something like this what you want?

> load_and_describe <- function(pkg) {
+     eval(substitute(library(pkg)))
+     packageDescription(pkg)
+ }
> load_and_describe("e1071")
Package: e1071
Version: 1.5-12
Date: 2006-01-11
Title: Misc Functions of the Department of Statistics (e1071), TU Wien
Depends: class
Imports: graphics, stats
Suggests: cluster, mlbench, nnet, randomForest, rpart, SparseM, xtable
Author: Evgenia Dimitriadou, Kurt Hornik, Friedrich Leisch, David
        Meyer, and Andreas Weingessel
Maintainer: Friedrich Leisch <Friedrich.Leisch at ci.tuwien.ac.at>
Description: Functions for latent class analysis, short time Fourier
        transform, fuzzy clustering, support vector machines, shortest
        path computation, bagged clustering, naive Bayes classifier,
        ...
License: GPL version 2.  See COPYRIGHT.svm.cpp for the copyright of the
        svm C++ code.
SaveImage: no
LazyLoad: yes
Packaged: Wed Jan 11 17:37:06 2006; leisch
Built: R 2.2.1; i386-pc-mingw32; 2006-01-12 09:52:56; windows


Andy


From: Chun-Ying Lee
> 
> On Thu, 09 Feb 2006 10:02:49 +0100, Uwe Ligges wrote
> > Chun-Ying Lee wrote:
> > > Hi all,
> > >  
> > >   I want to echo output to screen before next step, 
> > > like the following when i type library(pkname),
> > > 
> > > 
> > >>library(pkname)
> > > 
> > > 
> > > a few description about the package
> > > ........
> > > 
> > > 
> > >>
> > >>
> > > 
> > > how should I do to get this?
> > 
> > ?cat
> 
> I know the use of "cat"
> 
> but I mean that the description appear automatically
> when I type library(pkname)
> 
> > 
> > Uwe Ligges
> > 
> > > Thanks in advanced!!
> > > 
> > >
> 
>




More information about the R-help mailing list