R语言字符向量的子串substr()函数-中英文对照帮助文档
By MicroRbt Martinez PhD
R语言函数名:substr()
R语言函数功能:字符向量的子串
来自资源库:基础库(R语言自带)
substr()函数所属R语言包:所在R包具体名称、包功能的中英文双语描述见正文后面'--所在R语言包信息--'部分。
描述-----Description-----
Extract or replace substrings in a character vector.
提取或替换字符向量中的子字符串。
使用方法-----Usage-----
substr(x, start, stop)
substring(text, first, last = 1000000L)
substr(x, start, stop) <- value
substring(text, first, last = 1000000L) <- value
参数-----Arguments-----
参数x, text介绍: a character vector.
字符向量。
参数start, first介绍: integer. The first element to be replaced.
整数。第一个要替换的元素。
参数stop, last介绍: integer. The last element to be replaced.
整数。最后一个要替换的元素。
参数value介绍: a character vector, recycled if necessary.
字符向量,必要时回收。
详情-----Details-----
substring is compatible with S, with first and last instead of start and stop. For vector arguments, it expands the arguments cyclically to the length of the longest provided none are of zero length.
substring与S兼容,与first和last而不是start和stop兼容。对于矢量自变量,它将循环将自变量扩展为最长的provided长度,而长度都不为零。
When extracting, if start is larger than the string length then ""
-----未完,待续-----,↓↓↓展开剩余72%↓↓↓
|