Entering edit mode
4.3 years ago
smrutimayipanda
▴
20
i want to extract gene column (2nd column of every file) from multiple text files and merge them to get unique gene list. But in every text file number of rows differs. can someone please tell me how to write R code for this? Thanks in advance
It will work either way, but with the map functions in this case you can just put the name of the function at the end. You don't need to call it as an anonymous function. Also, you should escape the period in the file extension, otherwise it would match any character. I usually put an end of line in the regex too for good measure.
Appreciate the tips! Edited my original post.
No problem, just spreading the R love!
Thanks all for your answer. I will try it