stringr-----str_length
主页:https://cran.r-project.org/web/packages/stringr/index.html
#安装stringr包> install.packages('stringr')> library(stringr)
#stringr函数分类:
字符串拼接函数
字符串计算函数
字符串匹配函数
字符串变换函数
参数控制函数
#stringr字符串计算函数
str_length(string)
string: 字符串,字符串向量
计算字符串的长度:
> str_length(c("A", "abdata", "银河统计", NA)) [1] 1 6 4 NA
赞 (0)