a<-"What's the fuck"
a<-strsplit(a," ") #拆为单个字符,返回list型
substr(a, start = 1,stop = 1)
a<-unlist(a) #转化为非list型
substr(a, start = 1,stop = 1)
a<-"What's the fuck"
a<-strsplit(a," ") #拆为单个字符,返回list型
substr(a, start = 1,stop = 1)
a<-unlist(a) #转化为非list型
substr(a, start = 1,stop = 1)
本文标题:20190401-R语言提取字符串每个单词的首字母
本文链接:https://www.haomeiwen.com/subject/odlvbqtx.html
网友评论