所以我有下面的 Dataframe
我尝试使用gsub来提取数据,但它不工作,因为它似乎gsub只提取数字而不是整数。有没有任何软件包或函数,将允许我提取整数?
我尽力了
gsub(".*?([0-9]+).*", "\1",Not_Detect_134$Not_Detect_134)
但它只返回
[1] "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001"
[11] "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001"
[21] "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001"
[31] "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001"
[41] "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001" "\001"
1条答案
按热度按时间2w2cym1i1#
你可以使用这个:str_extract(Not_Detect_134,“\d+”)