title: How to report percentages by rows in createtableone command in tableone package?
body: <p>I want to report percentage by rows using CreateTableOne from tableone package in r using the following code</p>
  
  <pre><code>vars&lt;-c( "Group1vsGroup2", "Single.Institution",  
             "Internal.Funding",  "National.Funding", 
             "Industr1.Funding")
  
  CatVar&lt;-c(  "Single.Institution",  
             "Internal.Funding",  "National.Funding", 
             "Industr1.Funding")
  
  
  tab2 &lt;- CreateTableOne(vars = vars, strata = "Group1vsGroup2",factorVars = CatVar,data = df,test = T);tab2&lt;-print(tab2, margin=1,test = T, varLabels = T,quote = T,dropEqual = T)
  </code></pre>
  
  <p>I added "margin=1" as I saw in this <a href="https://rdrr.io/github/dewittpe/qwraps/man/tableone.html" rel="nofollow noreferrer">website</a> although it was for tableone command (not CreateTableOne), but I got % by columns as in the image below. Any advice will be greatly appreciated.
  <a href="https://i.stack.imgur.com/sIv0E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sIv0E.png" alt="enter image description here"></a></p>