Dear useRs,
shame on me, but I have no idea how to apply two arguments function on
my data. I have 2 vectors, 'n' and 'm' and the function below:
n <- c(10,30,50,1000)
m <- c(10,50,100,200)
MonteCarlo <- function(n,m){
temp <- NULL
for(i in 1:m){
temp <- c(temp,walk(n)) # walk is external function
}
return(c(n,m,mean(temp),sd(temp)))
}
Now I have to calculate mean(temp) and sd(temp) for each pair of
corresponding elements in vectors.
Thanks in advance, Andrej