---
title: "table"
format: html
keep-md: true
---


::: {#tbl-unetable .cell}

```{.r .cell-code}
library(gt)
start_date <- "2010-06-07"
end_date <- "2010-06-14"
sp500 |>
  dplyr::filter(date >= start_date & date <= end_date) |>
  dplyr::select(-adj_close) |>
  gt() |>
  tab_header(
    title = "S&P 500",
    subtitle = glue::glue("{start_date} to {end_date}")
  ) |>
  fmt_currency() |>
  fmt_date(columns = date, date_style = "wd_m_day_year") |>
  fmt_number(columns = volume, suffixing = TRUE)
```

::: {.cell-output-display}


```{=html}
<div id="aqcpwxoilg" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>#aqcpwxoilg table {
  font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#aqcpwxoilg thead, #aqcpwxoilg tbody, #aqcpwxoilg tfoot, #aqcpwxoilg tr, #aqcpwxoilg td, #aqcpwxoilg th {
  border-style: none;
}

#aqcpwxoilg p {
  margin: 0;
  padding: 0;
}

#aqcpwxoilg .gt_table {
  display: table;
  border-collapse: collapse;
  line-height: normal;
  margin-left: auto;
  margin-right: auto;
  color: #333333;
  font-size: 16px;
  font-weight: normal;
  font-style: normal;
  background-color: #FFFFFF;
  width: auto;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #A8A8A8;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #A8A8A8;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
}

#aqcpwxoilg .gt_caption {
  padding-top: 4px;
  padding-bottom: 4px;
}

#aqcpwxoilg .gt_title {
  color: #333333;
  font-size: 125%;
  font-weight: initial;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-color: #FFFFFF;
  border-bottom-width: 0;
}

#aqcpwxoilg .gt_subtitle {
  color: #333333;
  font-size: 85%;
  font-weight: initial;
  padding-top: 3px;
  padding-bottom: 5px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-color: #FFFFFF;
  border-top-width: 0;
}

#aqcpwxoilg .gt_heading {
  background-color: #FFFFFF;
  text-align: center;
  border-bottom-color: #FFFFFF;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#aqcpwxoilg .gt_bottom_border {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#aqcpwxoilg .gt_col_headings {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#aqcpwxoilg .gt_col_heading {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 6px;
  padding-left: 5px;
  padding-right: 5px;
  overflow-x: hidden;
}

#aqcpwxoilg .gt_column_spanner_outer {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: normal;
  text-transform: inherit;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 4px;
  padding-right: 4px;
}

#aqcpwxoilg .gt_column_spanner_outer:first-child {
  padding-left: 0;
}

#aqcpwxoilg .gt_column_spanner_outer:last-child {
  padding-right: 0;
}

#aqcpwxoilg .gt_column_spanner {
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: bottom;
  padding-top: 5px;
  padding-bottom: 5px;
  overflow-x: hidden;
  display: inline-block;
  width: 100%;
}

#aqcpwxoilg .gt_spanner_row {
  border-bottom-style: hidden;
}

#aqcpwxoilg .gt_group_heading {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  text-align: left;
}

#aqcpwxoilg .gt_empty_group_heading {
  padding: 0.5px;
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  vertical-align: middle;
}

#aqcpwxoilg .gt_from_md > :first-child {
  margin-top: 0;
}

#aqcpwxoilg .gt_from_md > :last-child {
  margin-bottom: 0;
}

#aqcpwxoilg .gt_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  margin: 10px;
  border-top-style: solid;
  border-top-width: 1px;
  border-top-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
  vertical-align: middle;
  overflow-x: hidden;
}

#aqcpwxoilg .gt_stub {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
}

#aqcpwxoilg .gt_stub_row_group {
  color: #333333;
  background-color: #FFFFFF;
  font-size: 100%;
  font-weight: initial;
  text-transform: inherit;
  border-right-style: solid;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  padding-left: 5px;
  padding-right: 5px;
  vertical-align: top;
}

#aqcpwxoilg .gt_row_group_first td {
  border-top-width: 2px;
}

#aqcpwxoilg .gt_row_group_first th {
  border-top-width: 2px;
}

#aqcpwxoilg .gt_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#aqcpwxoilg .gt_first_summary_row {
  border-top-style: solid;
  border-top-color: #D3D3D3;
}

#aqcpwxoilg .gt_first_summary_row.thick {
  border-top-width: 2px;
}

#aqcpwxoilg .gt_last_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#aqcpwxoilg .gt_grand_summary_row {
  color: #333333;
  background-color: #FFFFFF;
  text-transform: inherit;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
}

#aqcpwxoilg .gt_first_grand_summary_row {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-top-style: double;
  border-top-width: 6px;
  border-top-color: #D3D3D3;
}

#aqcpwxoilg .gt_last_grand_summary_row_top {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 5px;
  padding-right: 5px;
  border-bottom-style: double;
  border-bottom-width: 6px;
  border-bottom-color: #D3D3D3;
}

#aqcpwxoilg .gt_striped {
  background-color: rgba(128, 128, 128, 0.05);
}

#aqcpwxoilg .gt_table_body {
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
}

#aqcpwxoilg .gt_footnotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#aqcpwxoilg .gt_footnote {
  margin: 0px;
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#aqcpwxoilg .gt_sourcenotes {
  color: #333333;
  background-color: #FFFFFF;
  border-bottom-style: none;
  border-bottom-width: 2px;
  border-bottom-color: #D3D3D3;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
}

#aqcpwxoilg .gt_sourcenote {
  font-size: 90%;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 5px;
  padding-right: 5px;
}

#aqcpwxoilg .gt_left {
  text-align: left;
}

#aqcpwxoilg .gt_center {
  text-align: center;
}

#aqcpwxoilg .gt_right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#aqcpwxoilg .gt_font_normal {
  font-weight: normal;
}

#aqcpwxoilg .gt_font_bold {
  font-weight: bold;
}

#aqcpwxoilg .gt_font_italic {
  font-style: italic;
}

#aqcpwxoilg .gt_super {
  font-size: 65%;
}

#aqcpwxoilg .gt_footnote_marks {
  font-size: 75%;
  vertical-align: 0.4em;
  position: initial;
}

#aqcpwxoilg .gt_asterisk {
  font-size: 100%;
  vertical-align: 0;
}

#aqcpwxoilg .gt_indent_1 {
  text-indent: 5px;
}

#aqcpwxoilg .gt_indent_2 {
  text-indent: 10px;
}

#aqcpwxoilg .gt_indent_3 {
  text-indent: 15px;
}

#aqcpwxoilg .gt_indent_4 {
  text-indent: 20px;
}

#aqcpwxoilg .gt_indent_5 {
  text-indent: 25px;
}
</style>
<table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false">
  <thead>
    <tr class="gt_heading">
      <td colspan="6" class="gt_heading gt_title gt_font_normal" style>S&amp;P 500</td>
    </tr>
    <tr class="gt_heading">
      <td colspan="6" class="gt_heading gt_subtitle gt_font_normal gt_bottom_border" style>2010-06-07 to 2010-06-14</td>
    </tr>
    <tr class="gt_col_headings">
      <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="date">date</th>
      <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="open">open</th>
      <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="high">high</th>
      <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="low">low</th>
      <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="close">close</th>
      <th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col" id="volume">volume</th>
    </tr>
  </thead>
  <tbody class="gt_table_body">
    <tr><td headers="date" class="gt_row gt_right">Mon, Jun 14, 2010</td>
<td headers="open" class="gt_row gt_right">$1,095.00</td>
<td headers="high" class="gt_row gt_right">$1,105.91</td>
<td headers="low" class="gt_row gt_right">$1,089.03</td>
<td headers="close" class="gt_row gt_right">$1,089.63</td>
<td headers="volume" class="gt_row gt_right">4.43B</td></tr>
    <tr><td headers="date" class="gt_row gt_right">Fri, Jun 11, 2010</td>
<td headers="open" class="gt_row gt_right">$1,082.65</td>
<td headers="high" class="gt_row gt_right">$1,092.25</td>
<td headers="low" class="gt_row gt_right">$1,077.12</td>
<td headers="close" class="gt_row gt_right">$1,091.60</td>
<td headers="volume" class="gt_row gt_right">4.06B</td></tr>
    <tr><td headers="date" class="gt_row gt_right">Thu, Jun 10, 2010</td>
<td headers="open" class="gt_row gt_right">$1,058.77</td>
<td headers="high" class="gt_row gt_right">$1,087.85</td>
<td headers="low" class="gt_row gt_right">$1,058.77</td>
<td headers="close" class="gt_row gt_right">$1,086.84</td>
<td headers="volume" class="gt_row gt_right">5.14B</td></tr>
    <tr><td headers="date" class="gt_row gt_right">Wed, Jun 9, 2010</td>
<td headers="open" class="gt_row gt_right">$1,062.75</td>
<td headers="high" class="gt_row gt_right">$1,077.74</td>
<td headers="low" class="gt_row gt_right">$1,052.25</td>
<td headers="close" class="gt_row gt_right">$1,055.69</td>
<td headers="volume" class="gt_row gt_right">5.98B</td></tr>
    <tr><td headers="date" class="gt_row gt_right">Tue, Jun 8, 2010</td>
<td headers="open" class="gt_row gt_right">$1,050.81</td>
<td headers="high" class="gt_row gt_right">$1,063.15</td>
<td headers="low" class="gt_row gt_right">$1,042.17</td>
<td headers="close" class="gt_row gt_right">$1,062.00</td>
<td headers="volume" class="gt_row gt_right">6.19B</td></tr>
    <tr><td headers="date" class="gt_row gt_right">Mon, Jun 7, 2010</td>
<td headers="open" class="gt_row gt_right">$1,065.84</td>
<td headers="high" class="gt_row gt_right">$1,071.36</td>
<td headers="low" class="gt_row gt_right">$1,049.86</td>
<td headers="close" class="gt_row gt_right">$1,050.47</td>
<td headers="volume" class="gt_row gt_right">5.47B</td></tr>
  </tbody>
  
  
</table>
</div>
```


:::
:::