Re: [R] can not extract rows which match a string

2019-10-03 Thread Pages, Herve
Hi, On 10/3/19 11:58, Ana Marija wrote: > Hello, > > I have a dataframe (t1) with many columns, but the one I care about it this: >> unique(t1$sex_chromosome_aneuploidy_f22019_0_0) > [1] NA"Yes" > > it has these two values. > > I would like to remove from my dataframe t1 all rows which have

Re: [R] which element is duplicated?

2018-11-12 Thread Pages, Herve
Hi, On 11/12/18 17:08, Duncan Murdoch wrote: > The duplicated() function gives TRUE if an item in a vector (or row in > a matrix, etc.) is a duplicate of an earlier item.  But what I would > like to know is which item does it duplicate? > > For example, > > v <- c("a", "b", "b", "a") > duplicate