Your problem is that n.keep is less than 0. Why that is I cannot tell without appropriate context.
E.g., x <- 1:10 x[2:5] x[0:1] x[(-3):1] Michael On Tue, Jun 12, 2012 at 6:01 AM, sanshine <[email protected]> wrote: > Hello everyone, > > I`m trying to normalize and analize an illumina SNP array. > But when i`m trying to segmentate i`m getting an error: > Error in sort(abs(diff(genomdat)))[1:n.keep] : > only 0's may be mixed with negative subscripts. > I`ve tried everything to fix this but the error still occours. > > Can anybody give me a tip? > > Thanks in advance! > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Error-in-sort-abs-diff-genomdat-1-n-keep-only-0-s-may-be-mixed-with-negative-subscripts-tp4633091.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [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. ______________________________________________ [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.

