Re: [R] deleting certain observations in a data frame

2008-02-25 Thread Chang Liu
variables, but thanks Peter for the second trick. That one works for deleting the actually data entries. Karen> Subject: RE: [R] deleting certain observations in a data frame> Date: Fri, 15 Feb 2008 10:05:39 +1300> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]; r-help@r-proje

Re: [R] deleting certain observations in a data frame

2008-02-14 Thread Peter Alspach
Karen For indices, use the minus sign: yourData[-indicesToBeDeleted,] For rownames, negate %in%: yourData[!rownames(yourData)%in%namesToBeDeleted,] HTH Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Chang Liu > Sent: Friday, 15 F