Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Ana Marija
Makes sense, thank you! On Wed, 21 Oct 2020 at 17:46, Rolf Turner wrote: > > On Wed, 21 Oct 2020 16:15:22 -0500 > Ana Marija wrote: > > > Hello, > > > > I have a data frame with one column: > > > > > remove > > > > V1 > > > > 1 ABAFT_g_4RWG569_BI_SNP_A10_35096 >

Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Rolf Turner
On Wed, 21 Oct 2020 16:15:22 -0500 Ana Marija wrote: > Hello, > > I have a data frame with one column: > > > remove > > V1 > > 1 ABAFT_g_4RWG569_BI_SNP_A10_35096 > 2 ABAFT_g_4RWG569_BI_SNP_B12_35130 > 3 ABAFT_g_4RWG569_BI_SNP_E09_35088 > 4 ABAFT_g_4RWG569_BI_

Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Ana Marija
Thank you so much! On Wed, Oct 21, 2020 at 4:47 PM Rui Barradas wrote: > > Hello, > > To remove the file extension it's much easier to use base R > > > filename <- tools::file_path_sans_ext(basename(celFiles)) > > > Hope this helps, > > Rui Barradas > > Às 22:41 de 21/10/20, Rui Barradas escreveu

Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Rui Barradas
Hello, To remove the file extension it's much easier to use base R filename <- tools::file_path_sans_ext(basename(celFiles)) Hope this helps, Rui Barradas Às 22:41 de 21/10/20, Rui Barradas escreveu: Hello, This is probably because basename keeps the file extension, try instead filename

Re: [R] how do I remove entries in data frame from a vector

2020-10-21 Thread Rui Barradas
Hello, This is probably because basename keeps the file extension, try instead filename <- sub("(^[^\\.]*)\\..+$", "\\1", basename(celFiles)) celFiles[!filename %in% as.character(remove$V1)] Hope this helps, Rui Barradas Às 22:15 de 21/10/20, Ana Marija escreveu: Hello, I have a data fram

[R] how do I remove entries in data frame from a vector

2020-10-21 Thread Ana Marija
Hello, I have a data frame with one column: > remove V1 1 ABAFT_g_4RWG569_BI_SNP_A10_35096 2 ABAFT_g_4RWG569_BI_SNP_B12_35130 3 ABAFT_g_4RWG569_BI_SNP_E09_35088 4 ABAFT_g_4RWG569_BI_SNP_E12_35136 5 ABAFT_g_4RWG569_BI_SNP_F11_35122 6 ABAFT_g_4RWG569_BI_SNP_F12_351