Tablely-Render Table 1 in an easier way - Shiny Contest Submission

Tablely-Render Table 1 in an easier way

Authors: Hui Wing Ki

Abstract: Baseline Characteristics Table 1 is a standard routine in epidemiological or clinical researches. This shiny app would make the Table 1 rendering process less complicated and straightforward. The app users don't need to have any programming skills.

Full Description: bout ME
I am a current MPhil student (in Medical sciences) in the Chinese University of Hong Kong and a statistics graduate (in 2019). I learn shiny for just 2 months (please excuse the bugs...). Please report any bug here. I'm also looking for a study or work opportunity! Please contact me for more details.

User manual: (demo paper: Aspirin Reduces the Incidence of Hepatocellular Carcinoma in... : Clinical and Translational Gastroenterology)

Step 1. Navigate to the Create Table1 Tab and import cohort file. Click the Browse button for loading data. The imported data should be of sav, xlsx, or csv format. The data file should contain variable names at the first row. Also, the file size must not exceed 10 GB (theoretically 10 GB! dependes on the server. After uploading the file. There will be a notification appeared at the right bottom corner, and a sentence right below the uploadprogress bar: Datafile: uploaded! In this demostration, our file is called demo.sav
p1
Step 2. Select summary statistics. As of now only mean(sd), median(iqr), count(pct), and missing(pct) are provided. The switches mean the summary statistics of the whole cohort (all group), or divide the cohort by a variable (by group). You must at least switch one to yes in order to generate your Table 1! If you want to get the data by group, then please choose the grouping variable (must choose one!), and rename your group variable (optional). Then fill in all the required variable summaries (one variable can have all four summaries).


Step 3. Switch to the parameter attributes tab for Table 1 adjustment. First you need to press the button -- (Paste all selected parameters!) You may add extra variables in the [selected summary statistics] sidebar pannel and press the button to update your parameters. The create row group(s) for your parameters? switch is for your parameters grouping. If yes, then your screen should appear Number of row groups input. Please select the number of row groups then press update, then few bucket lists (number of row groups + 1) will pop up. Please drag all your parameters to buckets (row groups), and sort them by order. The order appeared in the Row group buckets will be the parameter's order of apperances of your Table 1. You must empty all the selected parameters for further submission. As for creating no row group, you just need to rearrange your selected parameters.

Step 4. Arrange your parameters like the below figure. Please refer to the paper for the ordering. (Note. the bucket list and the renaming tabs are not related. They are two different things, in case you ask.)

Step 5. Rename your row groups! This tab appears if you turn on the row group option. Double click to the cell in order to rename your row group. Your row group should not be empty or contain white space only. In this demo, we have three row groups, Clinical characteristics, any use of antiviral therapy, any use of concomitant drugs. Please use html codes if you want to include special characters or superscripts/subscripts.
p5
Step 6. Rename your parameters! Double click to the cell in order to rename your row group. Your row group should not be empty or contain white space only. Please use html codes if you want to include special characters or superscripts/subscripts. (note. you may need to transfer pages to pages because of the long parameter lists....) After the renaming, you may press update for the submission, again, you can change any thing inside this panel after the submission, but please remember to press the update again. Please press update even you don't have an updates.

Step 7. Adjust your Table 1 format. The four rows represent the display format of the four summary statistics. The decimal places must be a value integer. Patterns mean the special character between the statistics. i.e. mean(sd) = meansd; median(iqr)=Q2Q1Q3; count(pct)=countpct; missing(pct)=missingpct. You may just ignore the NAs, the NAs really mean not applicable here.After the adjusting, you may press update for the submission, again, you can change any thing inside this panel after the submission, but please remember to press the update again. Please press update even you don't have an updates.

Step 8. Switch to the Table 1 tab. Please press the buttons in order (2-add footnote,3-download table 1 are optional) Press Generate after you have update the parameter attributes in the parameter attributes tab. Please press update even you don't have an updates.

Step 9. Press footnote button after generating the table 1. You may skip this step if you don't want any footnote. You can only add footnote once only. If you get something wrong, then you may need a redo. You are strongly advised not to redo the steps as the table 1 are html table. you may just copy the table and paste it in word for changing the footnote by the way, to save your time and make life easier. After pressing the add footnote button, you will see a modal dialog pop up and ask you how many footnotes to insert. Here means how many footnotes (by variable) will appear in the table 1, e.g. subscript 1,2,...,n. if you don't need any footnote for a specific variable then please don't press update!!! the note for table 1 (optional) means to include footnote for the whole table 1. You may skip that too if you don't have any note for the table 1. After filling in all the information, you may press submit for the footnote adding.


Step 10. You shall see a table like this. And this is your final product. Congratulations! I was desprate for the creation of this table to be honest. so many steps...

Step 11. Download your product. press the download table 1 button for downloading the html table. Enjoy!


Keywords: Table 1, baseline characteristis, epidemiology, biostatistics, Tablr, research
Shiny app: https://huiiiiiii1155063467.shinyapps.io/Tablely--BaselineCharacteristicsTable1/
Repo: GitHub - huiwk/Tablely-Render-Table-1: generate your table 1 in a fun (...) way
RStudio Cloud: RStudio Cloud

Thumbnail:

Full image: