I would like to report descriptive values in a table (I am sure they should be in a table and not in a figure). The data comes from a 3-factorial experiment, so the table that I am able to produce with xtable (I'm doing it in an Rmarkdown and Knitr and have never used LaTex) contains one line per data value along the format:
group | condition | type | value
When all the lines are printed below each other, this in not very readable, for example the "group" entry remains the same for 10 lines. Is there a possibility to just print it the first time (in the first line) and then omit it until the "group" changes to the next group (only print it in line 11)? My table should have apa-format, so I use either rapa::apa(mytable) or papaja::apa_table(mytable) for the final print. Any help would be appreciated, thanks!
Finally, I changed the data-frame that then is converted into a table.
ReplicationTable %>% mutate(dependent_variable = ifelse(duplicated(dependent_variable), "", dependent_variable)
This replaces all entries with an empty string after the first unique entry in dependent_variable
. This also works in grouped data-frames.