Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

table1 align ignored #111

Open
FelipeCarrillo opened this issue Aug 4, 2023 · 1 comment
Open

table1 align ignored #111

FelipeCarrillo opened this issue Aug 4, 2023 · 1 comment

Comments

@FelipeCarrillo
Copy link

I am trying to align a 'table1' to the center but the align = 'center' is being ignored. I changed the output from 'text' to 'latex' or 'markdown' as described on the function but it still doesn't work. Consider the example below from here: https://cran.r-project.org/web/packages/table1/vignettes/table1-examples.html

library(boot) 

melanoma2 <- melanoma
 
# Factor the basic variables that
# we're interested in
melanoma2$status <- 
  factor(melanoma2$status, 
         levels=c(2,1,3),
         labels=c("Alive", # Reference
                  "Melanoma death", 
                  "Non-melanoma death"))
As a first attempt, we can do the following:

table1(~ factor(sex) + age + factor(ulcer) + thickness | status, output = 'markdown', align = 'center, data=melanoma2)
@SmartChen96
Copy link

Hello Benjaminrich,

I have a similar issue related to formatting alignment. I'm wondering if it's possible to have all descriptive statistics align either left or right, except for the first variable column. When I checked the original R codes, I found that the alignment is set to center, and there doesn't appear to be a parameter to control the alignment.

Thank you for your assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants