我正在使用NCBI参考序列登录号,如变量a
:
a <- c("NM_020506.1","NM_020519.1","NM_001030297.2","NM_010281.2","NM_011419.3", "NM_053155.2")
Run Code Online (Sandbox Code Playgroud)
要获得从biomart包我需要删除的信息.1
,.2
登录号等设备中后.我通常使用以下代码执行此操作:
b <- sub("..*", "", a)
# [1] "" "" "" "" "" ""
Run Code Online (Sandbox Code Playgroud)
但正如您所看到的,这不是这个变量的正确方法.谁能帮我这个?