R gsub 改变列里的名字,删除一个符号之后的所有内容

R gsub a \ escape the special characrer . .* means everything after . will b

R gsub

a <- gsub("\\..*", "", a)

\ escape the special characrer .

.* means
everything after . will be replaced by “”

a$b <- gsub('>', '', int$V1)

删除一个特殊符号