r - R str_detect 但仅适用于以指定字符串开头的情况
问题描述
londonofficemarch<-londonofficemarch %>%
filter(str_detect(BNF_CODE, "0501"))
是我的代码。但是,这会在 BNF_CODE 列中找到任何位置都包含 0501 的值。我只想要以 0501 开头的术语。R中有能力做到这一点吗?
解决方案
推荐阅读
- javascript - 两个unix时间戳在天、小时、分钟和秒之间的差异
- git - 如何让 gitlab CI 签出我的子模块?
- facebook - 使用 Graph API 7.0 或更高版本在 Facebook 页面上创建多照片帖子
- php - 多维数组中的计算
- c# - 在 WPF 应用程序的 DataGrid 中显示 SQL 查询的结果
- java - nodejs mongodb 和 android studio 获取速度慢
- javascript - 如何验证可编辑列?
- reactjs - Context 和 Reducer 的 React 单元测试
- java - 如何禁用 JTabbedPane 上的所有选项卡?
- c# - StreamReader 和 JsonTextReader 的反序列化不起作用