Hi, Please check your dimensions of theta.
> ff <- function(theta) theta[,1] > theta <- 1:5 > ff(theta) Error in theta[, 1] : incorrect number of dimensions > theta <- data.frame(c(1:5),c(6:10)) > ff(theta) [1] 1 2 3 4 5 ----- A R learner. -- View this message in context: http://r.789695.n4.nabble.com/incorrect-number-of-dimensions-tp2312640p2312684.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.