Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 regexpr("Hello :)","hello :)",fixed=TRUE,ignore.case=TRUE)
但 R 忽略了 ignore.case
这在R中可能吗?
谢谢,
它应该这样做。来自 ?regexpr
fixed: logical. If ‘TRUE’, ‘pattern’ is a string to be matched as is. Overrides all conflicting arguments.
不区分大小写当然是一个相互矛盾的论点。
这有效:使用小写模式,并将要匹配的字符串转换为小写:
regexpr("hello :)", tolower("Hello :)"),fixed=TRUE)