📜  获取不以结尾的字符串 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:59.885000             🧑  作者: Mango

代码示例1
char_array = c("foo_bar","bar_foo","apple","beer")
a = data.frame("data"=char_array,"data2"=1:4)
a$data = substr(a$data,1,nchar(a$data)-3)