Skip to content

Instantly share code, notes, and snippets.

@tuhulab
Created August 28, 2020 08:24
Show Gist options
  • Save tuhulab/6f57f70b6b1e6db0ef07d1dc3c8d94b1 to your computer and use it in GitHub Desktop.
Save tuhulab/6f57f70b6b1e6db0ef07d1dc3c8d94b1 to your computer and use it in GitHub Desktop.
Neg feature maniputation for Muyao
pos_n_max <- pos_data %>% pull(feature) %>% stringr::str_match("\\d{1,}") %>% max()
neg_feature_n <- neg_data %>% pull(feature) %>% stringr::str_match("\\d{1,}")
neg_data %>% mutate(feature = paste0("F", neg_feature_n + pos_n_max))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment