title: finalfit obtaining p-value column for continuous dependent variable
body: <p>I'm using <code>finalfit</code> which is great for outputting model fits etc but in the simpler case below I only have a continuous outcome as my dependent variable. 1) I was wondering is there a way that specifying <code>p = TRUE</code> can obtain a p-value across the label values as you can if you have a factor variable? 2) how can I specify a different type of test. The vignette <a href="https://finalfit.org/articles/all_tables_examples.html" rel="nofollow noreferrer">here</a> say its uses "Kruskal-Wallis/Mann-Whitney for continuous", what if we wanted a different test, how would we specify this? 3) similarly when you have a continuous variable, is there a way to add counts and percentage of the explanatory variables after levels columns?</p>
  
  <p>Example code which produces a p-value column when dependent variable is a factor:</p>
  
  <pre><code>library(finalfit)
  explanatory = c("age", "age.factor", "sex.factor", "obstruct.factor")
  dependent = "perfor.factor"
  t &lt;- colon_s %&gt;%
      summary_factorlist(dependent, explanatory, p = TRUE) 
  t
  
  #         label      levels          No         Yes     p
  # 1 Age (years)   Mean (SD) 59.8 (11.9) 58.4 (13.3) 0.578
  # 2         Age   &lt;40 years   68 (97.1)     2 (2.9) 1.000
  # 3             40-59 years  334 (97.1)    10 (2.9)      
  # 4               60+ years  500 (97.1)    15 (2.9)      
  # 7         Sex      Female  432 (97.1)    13 (2.9) 0.979
  # 8                    Male  470 (97.1)    14 (2.9)      
  # 5 Obstruction          No  715 (97.7)    17 (2.3) 0.018
  # 6                     Yes  166 (94.3)    10 (5.7)   
  </code></pre>
  
  <p>Now I would like to have a p-value column in the case of a continuous variable:</p>
  
  <pre><code>explanatory = c("age.factor", "sex.factor", "obstruct.factor", "perfor.factor")
  dependent = "time"
  ## Crosstable
  table_1 &lt;- colon_s %&gt;%
    summary_factorlist(dependent, explanatory, p = TRUE) 
  table_1
  
  #         label      levels      Mean (sd)
  # 1         Age   &lt;40 years 1544.3 (867.6)
  # 2             40-59 years 1769.4 (861.1)
  # 3               60+ years 1620.6 (875.3)
  # 4         Sex      Female 1674.2 (884.6)
  # 5                    Male 1666.0 (861.4)
  # 6 Obstruction          No 1700.0 (852.4)
  # 7                     Yes 1515.6 (933.6)
  # 8 Perforation          No 1671.2 (873.1)
  # 9                     Yes 1627.6 (851.8)
  </code></pre>
  
  <p>The <code>p = TRUE</code> doesn't work in this case, the p-value column I was thinking would run a test say, comparing the mean/median value of <code>time</code> between <code>Sex</code> depending on type of test suggested. Also after the levels column how can I add count and proportion column, e.g. female <code>445 (47 %)</code>?</p>
  
  <p>Thanks </p>