On 07/10/2014 2:45 AM, H. Dieter Wilhelm wrote:
Hello (),
I'd like to do the following
a <- 3
f1 <- function (x){
a*x^2
}
a <- 5
f2 <- function (x){
a*x^2
}
plotting f1, f2, ...
but f1 and f2 are the same, how can I evaluated the variables in the
function definition?
Thank you
Dieter
See the "open.account" example in section 10.7, "Scope", of the
Introduction to R manual.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
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.