Take in the results of an SSM analysis and return an HTML table with the desired formatting.
ssm_table(.ssm_object, caption = NULL, xy = TRUE, render = TRUE)
.ssm_object | The output of |
---|---|
caption | A string to be displayed above the table (default = NULL). |
xy | A logical indicating whether the x-value and y-value parameters should be included in the table as columns (default = TRUE). |
render | A logical indicating whether the table should be displayed in the RStudio viewer or web browser (default = TRUE). |
A tibble containing the information for the HTML table. As a side-effect, may also output the HTML table to the web viewer.
Other ssm functions:
ssm_analyze()
,
ssm_append()
,
ssm_parameters()
,
ssm_plot()
,
ssm_score()
Other table functions:
html_render()
,
ssm_append()
# \donttest{ # Load example data data("jz2017") # Create table of profile results res <- ssm_analyze(jz2017, scales = PA:NO, angles = octants(), measures = c(NARPD, ASPD) ) ssm_table(res)#> <table class='gmisc_table' style='border-collapse: collapse; margin-top: 1em; margin-bottom: 1em;' > #> <thead> #> <tr><td colspan='7' style='text-align: left;'> #> Correlation-based Structural Summary Statistics with 95% CIs</td></tr> #> <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;'>NARPD</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.20 [0.17, 0.24]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>-0.06 [-0.10, -0.03]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.18 [0.14, 0.21]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.19 [0.15, 0.22]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>109.0 [99.4, 118.8]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; text-align: left;'>0.957</td> #> </tr> #> <tr> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>ASPD</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.12 [0.09, 0.16]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>-0.10 [-0.13, -0.06]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.20 [0.17, 0.24]</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;'>115.9 [107.6, 124.2]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.964</td> #> </tr> #> </tbody> #> </table>#> # A tibble: 2 x 7 #> Profile Elevation `X-Value` `Y-Value` Amplitude Displacement Fit #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 NARPD 0.20 [0.17,~ -0.06 [-0.1~ 0.18 [0.14~ 0.19 [0.15~ 109.0 [99.4, ~ 0.957 #> 2 ASPD 0.12 [0.09,~ -0.10 [-0.1~ 0.20 [0.17~ 0.23 [0.19~ 115.9 [107.6,~ 0.964# Create table of contrast results res <- ssm_analyze(jz2017, scales = PA:NO, angles = octants(), measures = c(NARPD, ASPD), contrast = "test" ) ssm_table(res)#> <table class='gmisc_table' style='border-collapse: collapse; margin-top: 1em; margin-bottom: 1em;' > #> <thead> #> <tr><td colspan='7' style='text-align: left;'> #> Correlation-based Structural Summary Statistic Contrasts with 95% CIs</td></tr> #> <tr> #> <th style='font-weight: 900; border-bottom: 1px solid grey; border-top: 2px solid grey; text-align: left;'>Contrast</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; border-bottom: 2px solid grey; text-align: left;'>ASPD - NARPD</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>-0.08 [-0.11, -0.04]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>-0.04 [-0.08, -0.00]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.02 [-0.01, 0.06]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.04 [-0.00, 0.08]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>7.0 [-3.2, 17.3]</td> #> <td style='padding-right: 1em; min-width: 3em; white-space: nowrap; border-bottom: 2px solid grey; text-align: left;'>0.007</td> #> </tr> #> </tbody> #> </table>#> # A tibble: 1 x 7 #> Contrast `Δ Elevat~ `Δ X-Valu~ `Δ Y-Valu~ `Δ Amplit~ #> <chr> <chr> <chr> <chr> <chr> #> 1 ASPD - ~ -0.08 [-0.11, -~ -0.04 [-0.08, -~ 0.02 [-0.01, 0.~ 0.04 [-0.00, 0.~ #> # ... with 2 more variables: `Δ Displacement` <chr>, `Δ Fit` <chr># }