[R] summary() within a function

uaca@alumni.uv.es uaca at alumni.uv.es
Wed Jan 14 17:12:32 CET 2004


On Wed, Jan 14, 2004 at 04:53:45PM +0100, Eric Lecoutre wrote:
> 
> Unless 'summary' is the last evaluated object within your function (and 
> then it is the one implicitely returned by the function), you have to 
> explicitely ask for printing it:

Thanks for the explanation

> 
> 
> f <- function {
>         ...
>         model <- lm(rttx[,1] ~ rttx[,2] + 0);
>         # Print summary for the model
>         print(summary(model));
>         ...
> }

It worked as spected

regards

	Ulisses

                Debian GNU/Linux: a dream come true
-----------------------------------------------------------------------------
"Computers are useless. They can only give answers."            Pablo Picasso

--->	Visita http://www.valux.org/ para saber acerca de la	<---
--->	Asociación Valenciana de Usuarios de Linux		<---




More information about the R-help mailing list