-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappend_narration_subtitle.R
executable file
·54 lines (45 loc) · 1.56 KB
/
append_narration_subtitle.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
################################Append narration title depending on sites and diseases########
###########if disease is Palu then we have 03 possibilities.
################First, if We are in Tana ville
#########################Second, if We are in Tana périphérie
###############################For all except the 02 above
########### if disease is not Palu then no matter the sites are
#####################################################################################
title_yes=F
if (mylength_NA>0)
{
doc <- addParagraph(doc, pot(paste("- ",k,":"),en_gras(fontsize = 12)) )
title_yes=T
}
if ( L_palu )
{
#######"""fIRST BLOCK ########
if (L_tana==F & L_hautplateau==F)
{
cat('because we are not in Tana or périphérie...\n')
doc <- addParagraph(doc, pot(paste("- ",k,":"),en_gras(fontsize = 12)) )
title_yes=T
}
#######"""2nd BLOCK ########
if ( L_tana & Nbcases>0 )
{
cat('because we are in Tsaralalana, Behoririka,Andohatapenaka...\n')
doc <- addParagraph(doc, pot(paste("- ",k,":"),en_gras(fontsize = 12)) )
title_yes=T
}
#######"""3rd BLOCK ########
if (L_hautplateau & Nbcases>0)
{
cat('because we are in Antsirabe,Fianarantsoa or Anjozorobe...\n')
doc <- addParagraph(doc, pot(paste("- ",k,":"),en_gras(fontsize = 12)) )
title_yes=T
}
}
if ( L_diar & title_yes==F ) {
doc <- addParagraph(doc, pot(paste("- ",k,":"),en_gras(fontsize = 12)) )
title_yes=T
}
if ( L_tdr & title_yes==F ) {
doc <- addParagraph(doc, pot(paste("- ",k,":"),en_gras(fontsize = 12)) )
title_yes=T
}