[R] incorrect number of dimensions

Wu Gong wg2f at mtmail.mtsu.edu
Wed Aug 4 00:13:11 CEST 2010


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.



More information about the R-help mailing list