Re: [R] R newbie...

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Wed 07 Dec 2005 - 05:01:45 EST

David Hajage wrote:

> Hello,
>
> I'm a new user...
>
> I have a function :
>
> calculate <- function(x,y)
> {
> z <- x + y

# insert:

   z

> }
> I would like to use the result (z) with another function :
>
> recalculate <- function(...)
> {
> a <- z^2
# insert:

   a

> }

Type:

recalculate(calculate(3,4))

Please read "An Introduction to R" as well as the posting guide!

Uwe Ligges

> But R says that z does not exist...
>
> How can I use z in an another function ?
>
> Thank you for your answer...
>
> --
> David
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Dec 07 05:48:28 2005

This archive was generated by hypermail 2.1.8 : Wed 07 Dec 2005 - 09:36:55 EST