Re: [R] getting values out of functions

From: Spencer Graves <>
Date: Fri 30 Jul 2004 - 11:22:50 EST

      Have you looked at "writing your own functions" in "An Introduction to R", downloadable from "" -> Documentation: Manuals? If you want more than one object, you can return a list with all the objects you want as components; see "lists and data frames" in the same manual.

      hope this helps. spencer graves
p.s. "PLEASE do read the posting guide!". You may be able to find answers to questions like the quicker following this procedure, and your questions may be more likely to elicit more helpful responses.

Kathryn Jones wrote:

>Hi there,
>Just wondering if there's a way to get a value you've
>assigned within a function, out of the function?
>For example,
>function ()
> testing <-read.table("...",header=TRUE)
>I want to be able to use 'testing' outside of the function,
>so be able to call ls() and testing be there...
>Any ideas?
> mailing list
>PLEASE do read the posting guide!
> mailing list PLEASE do read the posting guide! Received on Fri Jul 30 11:31:33 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:22 EST