在Emeditor中颠倒顺序的最简单方法是什么?

时间:2019-06-17 14:13:32

标签: regex text emeditor

在Emeditor中颠倒顺序的最简单方法是什么?

示例:

library(tidyverse)

Problem %>% 
    mutate(
       current =
         pmap_chr(select(., contains("status")), ~
             case_when(
               any(str_detect(c(...), "(?i)Completed")) ~ "Completed",
               any(str_detect(c(...), "(?i)Exempt")) | any(str_detect(c(...), "(?i)Incomplete")) ~ "Exclude",
               which.max(c(...) == "Registered") == length(c(...)) ~ "Registered",
               any(str_detect(c(...), "(?i)No Show")) | any(str_detect(c(...), "(?i)Denied")) | any(str_detect(c(...), "(?i)Cancelled")) | any(str_detect(c(...), "(?i)Waitlist Expired")) || any(str_detect(c(...), "(?i)Withdrawn")) ~ "Not Taken",
               TRUE ~ "NA"
             )
            )
       )

# name   status_1   status_2   status_3   current   
#  <chr>  <chr>      <chr>      <chr>      <chr>     
#1 Angela Registered Withdrawn  No Action  Not Taken 
#2 Claire No Action  No Action  Registered Registered
#3 Justin Completed  Registered Withdrawn  Completed 
#4 Bob    Denied     No Action  No Action  Not Taken 
#5 Gil    No Action  Exempt     No Action  Exempt  

0 个答案:

没有答案