Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Use summary(CreateTableOne) in HTML Output

I use the CreateTableOne function to create a table for descriptive statistics - as an example, I used the mtcars dataset (and modified two variables to a factor to simulate categorical variables).


mydata <- mtcars

mydata$gear <- as.factor(mydata$gear)
mydata$carb <- as.factor(mydata$carb)

VarsForTableOne <- c("mpg", "cyl", "disp", "hp", "drat", "wt", "gear", "carb")

myTableOne <- CreateTableOne(vars = VarsForTableOne, data = mydata, strata = "vs")



Now I would like to get a table for the data with continuous aspects (min, mean, median, max, quartiles) and categorical data (percentage) with each characteristic per variable.

summary(myTableOne) generates all the information which is interesting for me, but myTableOne$ContTable and myTableOne$CatTable not enough. Is there a way to customize the output of CreateTableOne?

In the end, I would like to get a table that can be formatted as HTML in a Markdown and/or copied to Excel.

Thanks for any help!


code from exploratory testing tools.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Off-topic

Don't F&*% the planet.

Over the weekend, Atlassian ran a New York Times ad calling on business leaders to join us in committing to a net zero future through the Science-Based Targets Initiative. As part of our gl...

1,217 views 6 43
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you