Hi, Putting all parameters into a data frame would help.
Code like: parameters <- data.frame(mu=1:24,b=(1:24)*2,tau=(1:24)/2,sigma=(1:24)^2,ro=sqrt(1:24)) ll<- function(parameters){ results <- numeric(24) for (i in 1:24){ mu <- parameters$mu[i] b <- parameters$b[i] ..... results[i] <- sum(mu*b) } results } sum(results) ----- A R learner. -- View this message in context: http://r.789695.n4.nabble.com/Dealing-with-a-lot-of-parameters-in-a-function-tp2310384p2310468.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.