sanshine
2012-Jun-12 11:01 UTC
[R] Error in sort(abs(diff(genomdat)))[1:n.keep] : only 0's may be mixed with negative subscripts
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.
Gerrit Eichner
2012-Jun-12 14:00 UTC
[R] Error in sort(abs(diff(genomdat)))[1:n.keep] : only 0's maybemixed with negative subscripts
Hello, sanshine, maybe you should check the value of n.keep and make sure that it is non-negative. Hth -- Gerrit On Tue, 12 Jun 2012, sanshine 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. > > ______________________________________________ > R-help at 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.
R. Michael Weylandt
2012-Jun-12 14:47 UTC
[R] Error in sort(abs(diff(genomdat)))[1:n.keep] : only 0's may be mixed with negative subscripts
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 <S.A.J.van_der_Zeeuw at lumc.nl> 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. > > ______________________________________________ > R-help at 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.
Apparently Analagous Threads
- reordering huge data file
- DNAcopy package in R
- Complete newbie - create microarray image from data file?
- generic genotype calling algorithm?
- Error in function (classes, fdef, mtable): unable to find an inherited method for function "indexProbes", for signature "exprSet", "character"