[R] Unique subsetting question

AndrewPage savejarvis at yahoo.com
Wed Sep 22 19:48:46 CEST 2010


How about this:


s = c("aa", "bb", "cc", "", "aa", "dd", "", "aa") 

n = c(2, 3, 5, 6, 7, 8, 9, 3) 

b = c(TRUE, FALSE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE) 

df = data.frame(n, s, b)       # df is a data frame 


I want to display df with no value in s occurring more than once.  Also, I
want to delete the rows where s contains "".
-- 
View this message in context: http://r.789695.n4.nabble.com/Unique-subsetting-question-tp2550453p2550769.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list