Dear all, I have following list object:
dat <- vector("list", length=4)
for(i in 1:4) dat[[i]] <- diag(rnorm(5)^2)
names(dat) <- paste("A", 1:4, sep="")
It is ok upto this point. However if I want apply, suppose chol()
function on any of it's element, I am getting error:
> chol(dat['A1'])
Error in chol.default(dat["A1"]) : non-numeric argument to 'chol'
Can somebody point me where I am doing wrong?
Thanks and regards,
______________________________________________
[email protected] 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.