table format

19 views
Skip to first unread message

aminat...@gmail.com

unread,
Dec 18, 2019, 5:18:20 AM12/18/19
to compareGroups Forum

Hello!

First, thank you for a great package!

I would like to display my proportions not as a percentage but in decimal form (e. g. 43% in 0.43). Is this possible?

Thank you for your response.

Aminata

Isaac Subirana

unread,
Dec 24, 2019, 8:12:02 AM12/24/19
to compareGroups Forum
Hi Aminata,

First of all, many thanks for using the compareGroups package. Your feedback is very usefull.
By now, it is not possible not report proportions instead of percentages. We will incoporate the possibility to report proportions for categorical variables in the next version.

Regards,

Isaac.

Isaac Subirana

unread,
Jan 15, 2020, 9:08:04 AM1/15/20
to compareGroups Forum
Hi Aminata, 

We just have added the option to report proporions instead of percentages for categorical row-variables.
By now, this update has been incorporated in the version available on github. To download it, type:

library(devtools)
devtools::install_github("isubirana/compareGroups")

In order to report proportions, you must specify the new argument compute.prop = TRUE in the compareGroups or descrTable function. Below there is an example

library(compareGroups)
data
(predimed)

cg
<- compareGroups(group ~ ., predimed, compute.prop=TRUE)
createTable
(cg)

# or directly using descrTable
descrTable
(group ~ ., predimed, compute.prop=TRUE)


I hope it helps.

Regards,

Isaac.

Reply all
Reply to author
Forward
0 new messages