Sundar Dorai-Raj <[EMAIL PROTECTED]> writes: > S Peri wrote: > > > Hi, > > I have a data frame. E.g: > > Fertility Agriculture > > Courtelary 80.2 17.0 > > Delemont 83.1 45.1 > > Franches-Mnt 92.5 39.7 > > How can I delete : > > Courtelary 80.2 17.0 > > Thanks. > > P > > > > See ?subset. Assuming your data is called `mydata': > > subset(mydata, Fertility != 80.2 | Agriculture != 17.0) > > Note the single `|' for OR. See ?Logic for explanation.
subset(mydata, -1) might be more to the point, or subset(mydata, rownames(mydata) != "Courtelary") , or just mydata[-1,] , or mydata[-match("Courtelary",rownames(mydata))] , or.... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [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