Skip to contents

Combine SSM tables by appending them as rows.

Usage

ssm_append(.ssm_table, ..., caption = NULL, render = TRUE)

Arguments

.ssm_table

A data frame from the ssm_table() function to be the first row(s) of the combined table.

...

One or more additional data frames from the ssm_table() function to be appended to .ssm_table in the order of input.

caption

A string to be displayed above the table if rendered.

render

A logical indicating whether the table should be displayed in the RStudio viewer or web browser (default = TRUE).

Value

A tibble containing the information for the HTML table. As a side-effect, may also output the HTML table to the web viewer.

See also

Other ssm functions: ssm_analyze(), ssm_parameters(), ssm_plot(), ssm_score(), ssm_table()

Other table functions: html_render(), ssm_table()

Examples

data("jz2017")
res1 <- ssm_analyze(jz2017, PA:NO, octants())
res2 <- ssm_analyze(jz2017, PA:NO, octants(), grouping = Gender)
tab1 <- ssm_table(res1, render = FALSE)
tab2 <- ssm_table(res2, render = FALSE)
ssm_append(tab1, tab2)
#> <table class='gmisc_table' style='border-collapse: collapse; margin-top: 1em; margin-bottom: 1em;' >
#> <thead>
#> <tr>
#> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>Profile</th>
#> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>Elevation</th>
#> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>X-Value</th>
#> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>Y-Value</th>
#> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>Amplitude</th>
#> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>Displacement</th>
#> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>Fit</th>
#> </tr>
#> </thead>
#> <tbody>
#> <tr>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>All</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.92 (0.89, 0.94)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.35 (0.32, 0.38)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>-0.25 (-0.28, -0.22)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.43 (0.40, 0.46)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>324.3 (320.8, 327.8)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.878</td>
#> </tr>
#> <tr>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>Female</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.95 (0.91, 0.98)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.46 (0.42, 0.50)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>-0.31 (-0.35, -0.27)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.55 (0.51, 0.60)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>326.0 (322.2, 329.9)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.889</td>
#> </tr>
#> <tr>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>Male</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.88 (0.84, 0.93)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.23 (0.19, 0.26)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>-0.19 (-0.23, -0.15)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.29 (0.26, 0.33)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>320.7 (313.4, 328.2)</td>
#> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.824</td>
#> </tr>
#> </tbody>
#> </table>
#> # A tibble: 3 × 7
#>   Profile Elevation         `X-Value`     `Y-Value` Amplitude Displacement Fit  
#>   <chr>   <chr>             <chr>         <chr>     <chr>     <chr>        <chr>
#> 1 All     0.92 (0.89, 0.94) 0.35 (0.32, … -0.25 (-… 0.43 (0.… 324.3 (320.… 0.878
#> 2 Female  0.95 (0.91, 0.98) 0.46 (0.42, … -0.31 (-… 0.55 (0.… 326.0 (322.… 0.889
#> 3 Male    0.88 (0.84, 0.93) 0.23 (0.19, … -0.19 (-… 0.29 (0.… 320.7 (313.… 0.824