Revision | 0a0cdb768b1d74bd85e8aba705d0aff5d81b6ccf (tree) |
---|---|
Time | 2021-12-02 22:34:12 |
Author | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
A simple script to look for keywords in TAM.
@@ -0,0 +1,31 @@ | ||
1 | +rm(list=ls()) | |
2 | + | |
3 | +library(tidyverse) | |
4 | +library(stringr) | |
5 | +library(stringi) | |
6 | +library(openxlsx) | |
7 | + | |
8 | +source("/home/lorenzo/myprojects-hg/R-codes/stat_lib.R") | |
9 | + | |
10 | + | |
11 | +df_tam <- readRDS("/home/lorenzo/MEGA/work/COMP/stat_support/tam-clean/tam_cleaned_latest.RDS") %>% | |
12 | + mutate(beneficiary_country=recode(beneficiary_country, | |
13 | + "Czech Republic"="Czechia")) | |
14 | + | |
15 | + | |
16 | + | |
17 | +df_search <- df_tam %>% | |
18 | + filter(beneficiary_country=="Italy") | |
19 | + | |
20 | + | |
21 | + | |
22 | +s1 <- df_search %>% | |
23 | + find_text_filter("(?i)colavita") | |
24 | + | |
25 | +s2 <- df_search %>% | |
26 | + find_text_filter("(?i)favellato") | |
27 | + | |
28 | + | |
29 | +save_excel(s1, "colavita.xlsx") | |
30 | + | |
31 | +print("So far so good") |