> foo <- function(tiro){
+  tiro <- c(tiro, 3 * tiro)
+  tiro
+ }
> foo(2)
[1] 2 6

Is this what you want?

spencer graves

Tobias Verbeke wrote:
Dear list,

How can one "from within a function" act
on these variables ("outside" a function)
that were given as arguments.

If I have e.g. this beginning of a function:

foo <- function(tiro){
app.tiro <- 3 * tiro

[...]

}

How can I from within the curly brackets
e.g. concatenate the app.tiro to
the particular variable I passed as the
argument `tiro' ?

What is the technical name of this phenomenon ?

Thank you in advance,


Tobias


PS forgive my non-programmer lingo

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to