Add backslashes before any metacharacters found in a string.
字符串中发现任何元字符前添加反斜杠。
用法----------Usage----------
protectMetachar(x)
参数----------Arguments----------
参数:x
character vector
特征向量
Details
详情----------Details----------
This function is used to protect strings containing metacharacters so that the metacharacters can be treated as ordinary characters in string matching functions operations.
此功能是用来保护含元字符的字符串,所以可以作为普通字符的字符串匹配功能操作处理的元字符。
值----------Value----------
A character vector of the same length as x in which two backslashes have been inserted before any metacharacter.
特征向量的长度相同x在这两个反斜杠之前已插入任何字元。
作者(S)----------Author(s)----------
Gordon Smyth
参见----------See Also----------
An overview of LIMMA functions for reading data is given in 03.ReadingData.
在03.ReadingData一个读取数据LIMMA功能的概述。
举例----------Examples----------
# without protectMetachar, this would be no match[没有protectMetachar,这将是不匹配]
grep(protectMetachar("Ch1 (mean)"),"Ch1 (mean)")