Hello, I am having some problem in retrieving the list elements Code Mean_of_mc is a list as described below mean_mc_1 mean_mc_2 mean_mc_3 mean_mc 0.9577246 2.000516 2.962521 mean_mc 7.957725 9.000516 9.962521 optim(par=c(lVal=2, mu=Mean_of_mc), fn=xnorm, method = "BFGS", control=list(fnscale=-1)) xnorm= function(par) { print(par) x=par['parl'] l=par['lVal'] val=par['mu'] #some logic } get NA for val, how can i get all the values of Mean_of_mc Thanks Niharika [[alternative HTML version deleted]]