Entering edit mode
                    4.0 years ago
        Lila M 
        
    
        ★
    
    1.3k
    Hello, I don't know if this is the best place to ask this question, but I will try. I have a data set with single nucleotide mutations, but I have some rows that contains insertion, something like this:
chr1  T  C     A
chr1  T  C+G   A 
chr1  T  C+T   T
I would like to store in one variable the mutations without insertions and in other the mutations with them. What I've done so far is:
xx <- x %>% filter(across(everything(), ~ !str_detect( "+")))
but it did not worked, Any clues? Thank you!
I would like a dplyr approach, if possible. What worked for me is
However, for insertion doesn't work
Any ideas what I'm doing wrong? Thanks!
I have updated the my answer. if you specifiy which column to look for the "+", your code work well.