View source: R/set_limit_data_by.R
| set_limit_data_by | R Documentation | 
This function allows you to select a combination of by variables or
potentially target variables for which you only want to display values
present in the data. By default, Tplyr will create a cartesian combination of
potential values of the data. For example, if you have 2 by variables
present, then each potential combination of those by variables will have a
row present in the final table. set_limit_data_by() allows you to choose
the by variables whose combination you wish to limit to values physically
present in the available data.
set_limit_data_by(e, ...)
| e | A tplyr_layer | 
| ... | Subset of variables within by or target variables | 
a tplyr_table
tplyr_table(tplyr_adpe, TRT01A) %>%
  add_layer(
    group_desc(AVAL, by = vars(PECAT, PARAM, AVISIT))
  ) %>%
  build()
tplyr_table(tplyr_adpe, TRT01A) %>%
  add_layer(
    group_desc(AVAL, by = vars(PECAT, PARAM, AVISIT)) %>%
      set_limit_data_by(PARAM, AVISIT)
  ) %>%
  build()
tplyr_table(tplyr_adpe, TRT01A) %>%
  add_layer(
    group_count(AVALC, by = vars(PECAT, PARAM, AVISIT)) %>%
      set_limit_data_by(PARAM, AVISIT)
  ) %>%
  build()
tplyr_table(tplyr_adpe, TRT01A) %>%
  add_layer(
    group_count(AVALC, by = vars(PECAT, PARAM, AVISIT)) %>%
      set_limit_data_by(PECAT, PARAM, AVISIT)
  ) %>%
  build()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.