Hi,

  Maybe I missed something.  The following example works.  It should not
cause any problem with the same parameter names since their scopes are
within the functions.

> function2 <- function(a,b,c,d){
+ a+b+c+d}
> function2(1:2,2:3,3:4,4:5)
[1] 10 14
> function1 <- function(a,b,c,d){
+ newb <- b+1
+ newc <- c+1
+ newd <- d+1
+ function2(a,newb,newc,newd)}
> function1(1:2,2:3,3:4,4:5)
[1] 13 17



--
View this message in context: 
http://r.789695.n4.nabble.com/Variables-of-a-function-called-inside-another-one-tp4702469p4702493.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to