Remove all text before colon

后端 未结 9 1177
天命终不由人
天命终不由人 2020-11-27 12:45

I have a file containing a certain number of lines. Each line looks like this:

TF_list_to_test10004/Nus_k0.345_t0.1_         


        
9条回答
  •  失恋的感觉
    2020-11-27 13:39

    There are certainly more than 2 ways in R. Here's another.

    unlist(lapply(strsplit(foo, ':', fixed = TRUE), '[', 2))
    

    If the string has a constant length I imagine substr would be faster than this or regex methods.

提交回复
热议问题