On Fri, Oct 16, 2009 at 01:55:03AM -0700, Noah Silverman wrote: > I think you may be correct. > > I've manage to get the data into a format that the function accepts. > > The error appears to be because I have negative values in my data: > > Error in apply(safeNormCDF(s), 1, prod) : > dim(X) must have a positive length
Sounds like safeNormCDF() does not return a matrix but a vector. What does dim(safeNormCDF(s)) say? > apply(1:9, 1, sum) Error in apply(1:9, 1, sum) : dim(X) must have a positive length > apply(matrix(1:9, nrow=3), 1, sum) [1] 12 15 18 > apply(matrix(1:9, nrow=1), 1, sum) [1] 45 cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ ______________________________________________ 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.