Skip to content

[Bug]: superscript in as_paragraph docx_exporter() #138

@munoztd0

Description

@munoztd0

What happened?

Issue in tsiex01 apparently.. to discuss , but just jotting it down

result
Duration of Treatment; Safety Analysis Set (Study jjcs - core)

———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Active Study Agent Difference in Means (95% CI)
Xanomeline High Dose Xanomeline Low Dose Combined Placebo Xanomeline High Dose vs Placebo Xanomeline Low Dose vs Placebo
Parameter N=53 N=73 N=126 N=59
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
Duration of treatment~[super a], ([unit])
Mean (SD) 17.41 (11.408) 20.46 (10.198) 19.18 (10.786) 18.64 (10.656) -1.23 (-5.23, 2.77) 1.82 (-1.88, 5.52)
Median 16.10 21.20 18.90 18.60
Min, max 0.2, 35.4 0.1, 37.9 0.1, 37.9 0.9, 37.2
Interquartile range 8.30, 27.80 14.70, 28.10 11.30, 28.00 9.30, 26.30
Total treatment (subject years) 922.9 (76.9) 1493.8 (124.5) 2416.7 (201.4) 1099.9 (91.7)

Duration of treatment, n (%)
0 to <3 months 7 (13.2%) 4 (5.5%) 11 (8.7%) 2 (3.4%)
3 to <6 months 5 (9.4%) 5 (6.8%) 10 (7.9%) 5 (8.5%)
6 to <9 months 3 (5.7%) 3 (4.1%) 6 (4.8%) 7 (11.9%)
9 to <12 months 4 (7.5%) 2 (2.7%) 6 (4.8%) 7 (11.9%)
12 to <15 months 6 (11.3%) 8 (11.0%) 14 (11.1%) 5 (8.5%)
15 to <18 months 3 (5.7%) 10 (13.7%) 13 (10.3%) 3 (5.1%)
18 to <21 months 5 (9.4%) 4 (5.5%) 9 (7.1%) 5 (8.5%)
21 to <24 months 1 (1.9%) 7 (9.6%) 8 (6.3%) 5 (8.5%)
24 to <27 months 3 (5.7%) 6 (8.2%) 9 (7.1%) 6 (10.2%)
27 to <30 months 6 (11.3%) 9 (12.3%) 15 (11.9%) 2 (3.4%)
30 to <33 months 5 (9.4%) 4 (5.5%) 9 (7.1%) 3 (5.1%)
33 to <36 months 5 (9.4%) 9 (12.3%) 14 (11.1%) 5 (8.5%)
36 to <39 months 0 2 (2.7%) 2 (1.6%) 4 (6.8%)

Duration of treatment~[super b], n (%)
<1 month 4 (7.5%) 1 (1.4%) 5 (4.0%) 1 (1.7%)
>=1 month 49 (92.5%) 72 (98.6%) 121 (96.0%) 58 (98.3%)
>=2 months 46 (86.8%) 71 (97.3%) 117 (92.9%) 58 (98.3%)
>=3 months 46 (86.8%) 69 (94.5%) 115 (91.3%) 57 (96.6%)
>=6 months 41 (77.4%) 64 (87.7%) 105 (83.3%) 52 (88.1%)
>=12 months 34 (64.2%) 59 (80.8%) 93 (73.8%) 38 (64.4%)
>=24 months 19 (35.8%) 30 (41.1%) 49 (38.9%) 20 (33.9%)
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

~{super a} Duration of treatment is defined as [(date of last dose of study treatment – date of first dose of study treatment) +1].
~{super b} Subjects are summarized in all applicable duration categories.

output_dir = tempdir()
export_as_docx_j(result,

  •              tblid = "superscripttable",
    
  •              output_dir = out_dir,
    
  •              orientation = "landscape",
    
  •              markup_df = docx_markup_df)
    

Error in parse(text = str_after) :
:1:48: unexpected string constant
1: flextable::as_paragraph('Duration of treatment'', ([unit])'
^
Called from: parse(text = str_after)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions