I am using R markdown to create summary statistics table with qwraps2. I am not able to get the desired output and I can spot where is my mistake. I have practiced on mtcars2 and everything was alright. I want to get a proper table with all the labels. And also, why the last cell has 2 numbers (highlighted)?
Sample Data
DELTA_LYSHOLM DELTA_TEGNER DELTA_IKDC
28 0 0
0 0 0
0 4.6
0 4.2
0 3.7
35 0 0
0 0 31.04
0 0 42
0 0 0
0 0 0
48 6 81
46 7 88
10.4 0.9 0
0 0 0
19 0 0
0 0 0
0 0 0
0 0 0
0 0 19.2
83.3 0 78
30.67 0 0
Library(tidyverse)
Library(qwraps2)
Library(readxl)
Summary_Descriptive <-
list("Delta Lysholm Scores" =
list("min" = ~ min(DELTA_LYSHOLM),
"max" = ~ max(DELTA_LYSHOLM),
"mean (sd)" = ~ qwraps2::mean_sd(DELTA_LYSHOLM, na_rm = TRUE, denote_sd = "paren")),
"Delta Tegner scores" =
list("min" = ~ min(DELTA_TEGNER),
"max" = ~ max(DELTA_TEGNER),
"mean (sd)" = ~ qwraps2::mean_sd(DELTA_TEGNER, na_rm = TRUE, denote_sd = "paren")),
"Delta IKDC Scores" =
list("min" = ~ min(DELTA_IKDC),
"max" = ~ max(DELTA_IKDC),
"mean (sd)" = ~ qwraps2::mean_sd(DELTA_IKDC, na_rm = TRUE, denote_sd = "paren"))
)
Final_Descriptive <- summary_table(ACLR_CHONDRAL, Summary_Descriptive)
Final_Descriptive
Then this what I am getting.
ACL (N = 21)
min 0
max 83.3
mean..sd. 14.30 (22.89)
min.1 0
max.1 7
mean..sd..1 1.26 (2.29)
min.2 NA
max.2 NA
mean..sd..2 18; 18.85 (31.71)
I could not find an answer to try
We have to add this line to your code:
options(qwraps2_markup = 'markdown') # default is latex