[R] Double return statement

Sarah Goslee sarah.goslee at gmail.com
Wed Aug 14 16:31:16 CEST 2013


Hi,

The usual thing to do is return a list containing output_1 and output_2.

Sarah

On Wed, Aug 14, 2013 at 10:23 AM, Katherine Gobin
<katherine_gobin at yahoo.com> wrote:
> Dear R forum,
>
> I have a function which generates say two outputs, say output_1 and output_2. Output_1 is a single row output whereas Output_2 is a dataframe having multiple records. Is it possible to use two return statements in function. Output_2 uses some records from output_1, hence I need to have these outputs generated from the same function.
>
> Thanking in advance
>
> With warm regards
>
> Katherine



-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list