我制作了一个条形图来显示越南的人口分布。这是我的vietnam2015数据:1 2015 0-4 77533 2015= "5-9") %>% # Somehow this weird value creeped into the data frame, is therefor filtered out.
我正在做一项常见的任务,试图从格式不一致的字符串条目中获取日期,这些字符串条目的数字看起来也很像日期。大多数日期中存在的一个重要格式一致性是数字之间的分隔符是一致的。我还希望能够做的是对不匹配的年份进行反向引用,这样如果某个年份在一个位置匹配,201[5-9]" it cannot be matched in another location.dat1 %>% str_extract("([0-3][0-9]|[0-3][0-9]|(201[5-9]|1[5-9]))([