Re: [R] deleting rows provisionally

2009-04-24 Thread David Winsemius
On Apr 24, 2009, at 7:50 AM, onyourmark wrote: Hi. Thanks very much for the reply and the good suggestion. It works well. But I don't get why the for loop is not deleting anything or making any assignments? Or I should say, doesn't answer3[-i,] delete entries from answer3 when the if cond

Re: [R] deleting rows provisionally

2009-04-24 Thread Hans Ekbrand
On Fri, Apr 24, 2009 at 04:50:48AM -0700, onyourmark wrote: > > Hi. Thanks very much for the reply and the good suggestion. It works well. > But I don't get why the for loop is not deleting anything or making any > assignments? Or I should say, doesn't answer3[-i,] delete entries from > answer3 wh

Re: [R] deleting rows provisionally

2009-04-24 Thread onyourmark
Hi. Thanks very much for the reply and the good suggestion. It works well. But I don't get why the for loop is not deleting anything or making any assignments? Or I should say, doesn't answer3[-i,] delete entries from answer3 when the if condition is true? Also, in your first solution answer2[-(a

Re: [R] deleting rows provisionally

2009-04-23 Thread Ben Bolker
onyourmark wrote: > > I have an object. I think it is a matrix, called 'answer2' > str(answer2) > int [1:1537, 1:2] 1 399 653 2 3 600 4 5 271 870 ... > - attr(*, "dimnames")=List of 2 > ..$ : chr [1:1537] "a4.1" "hirschsprung.399" "peritoneal.653" > "abdomen.2" ... > ..$ : chr [1:2] "row

[R] deleting rows provisionally

2009-04-23 Thread onyourmark
I have an object. I think it is a matrix, called 'answer2' str(answer2) int [1:1537, 1:2] 1 399 653 2 3 600 4 5 271 870 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:1537] "a4.1" "hirschsprung.399" "peritoneal.653" "abdomen.2" ... ..$ : chr [1:2] "row" "col" I want to delete rows that