函数计算字符数量,包括在一个字符串的空格的个数。
nchar()函数的基本语法是:
nchar(x)
以下是所使用的参数的说明:
result <- nchar("Count the number of characters") print(result)
当我们上面的代码执行时,它产生以下结果:
[1] 30
R语言统计字符串的字符数ncahr函数
原文:http://www.cnblogs.com/csguo/p/7294085.html