Skip to content

Total rows can't be added after the fact  #8

Description

@statasaurus

This works for making totals columns

demog_ard <- adsl %>%
  tardis_table(treat_var = TRT01A, where = SAFFL == "Y") %>%
  add_total_group(group_name = "Total")


# Now let's add some variables we want. First we are going to start with AGE
demog_ard %>%
  add_layer(
    group_count(target_var = AGEGR1, by = "Age (years)")
  )

# To see how this looks we are going to use the build function to build the ARD
demog_ard %>%
  build() 

But this doesn't

demog_ard <- adsl %>%
  tardis_table(treat_var = TRT01A, where = SAFFL == "Y") 


# Now let's add some variables we want. First we are going to start with AGE
demog_ard %>%
  add_layer(
    group_count(target_var = AGEGR1, by = "Age (years)")
  )

# To see how this looks we are going to use the build function to build the ARD
demog_ard %>%
  add_total_group(group_name = "Total") %>%
  build() 

I will note that if you make desc layers it works fine either way

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions