```{r}
#| label: tbl-lmc-mewma
#| tbl-cap: "Longitud media de corrida (estado cero) para el diagrama de control MEWMA $[$@PrabhuRunger1997$]$"
#| table-caption: left
lmc_mewma <- data.table::data.table(
p = c(
NA, 2L, NA, NA, NA, NA, NA, NA, 4L, NA, NA, NA, NA, NA,
NA, 6L, NA, NA, NA, NA, NA, NA, 10L, NA, NA, NA, NA, NA,
NA, 15L, NA, NA, NA, NA, NA
),
delta = c(
NA, 0, 0.5, 1, 1.5, 2, 3, NA, 0, 0.5, 1, 1.5, 2, 3, NA,
0, 0.5, 1, 1.5, 2, 3, NA, 0, 0.5, 1, 1.5, 2, 3, NA, 0,
0.5, 1, 1.5, 2, 3
),
lanbda_1 = c(
7.35, 199.93, 26.61, 11.23, 7.14, 5.28, 3.56, 11.22,
199.84, 32.29, 13.48, 8.54, 6.31, 4.23, 14.6, 200.11,
36.39, 15.08, 9.54, 7.05, 4.72, 20.72, 199.91, 42.49,
17.48, 11.04, 8.15, 5.45, 27.82, 199.95, 48.2, 19.77,
12.46, 9.2, 6.16
),
lanbda_2 = c(
8.64, 199.98, 28.07, 10.15, 6.11, 4.42, 2.93, 12.73,
200.12, 35.11, 12.17, 7.22, 5.19, 3.41, 16.27, 200.03,
40.38, 13.66, 8.01, 5.74, 3.76, 22.67, 199.95, 48.52,
15.98, 9.23, 6.57, 4.28, 30.03, 199.89, 56.19, 18.28,
10.41, 7.36, 4.78
),
lanbda_3 = c(
9.65, 199.91, 35.17, 10.2, 5.49, 3.78, 2.42, 13.87,
199.94, 46.3, 12.67, 6.53, 4.41, 2.77, 17.51, 200.11,
54.71, 14.63, 7.32, 4.88, 3.03, 24.07, 200.08, 67.25,
17.92, 8.58, 5.6, 3.43, 31.59, 200.08, 78.41, 21.4,
9.89, 6.32, 3.8
),
lanbda_4 = c(
10.08, 199.82, 44.1, 11.36, 5.48, 3.56, 2.2, 14.34,
199.91, 59.28, 14.81, 6.68, 4.2, 2.5, 18.01, 200.18,
70.3, 17.71, 7.65, 4.68, 2.72, 24.62, 200.01, 85.68,
22.72, 9.28, 5.47, 3.07, 32.19, 200.03, 98.54, 28.06,
11.08, 6.3, 3.43
),
lanbda_5 = c(
10.31, 199.83, 53.82, 13.26, 5.78, 3.53, 2.05, 14.58,
199.96, 72.43, 18.12, 7.31, 4.24, 2.36, 18.26, 199.81,
85.1, 22.27, 8.6, 4.8, 2.58, 24.89, 199.98, 102.05,
29.47, 10.91, 5.77, 2.93, 32.48, 199.96, 115.36, 36.96,
13.53, 6.84, 3.29
),
lanbda_6 = c(
10.44, 200.16, 64.07, 15.88, 6.36, 3.62, 1.95, 14.71,
200.05, 85.28, 22.54, 8.4, 4.48, 2.27, 18.39, 200.01,
99.01, 28.22, 10.2, 5.2, 2.51, 25.03, 199.84, 116.25,
37.81, 13.49, 6.48, 2.9, 32.63, 199.91, 129.36, 47.44,
17.26, 7.97, 3.31
),
lanbda_7 = c(
10.52, 200.04, 74.5, 19.24, 7.25, 3.84, 1.9, 14.78,
199.99, 97.56, 28.06, 10.03, 4.93, 2.24, 18.47, 199.87,
111.65, 35.44, 12.53, 5.89, 2.51, 25.11, 200.12, 128.82,
47.54, 17.17, 7.68, 2.97, 32.71, 199.93, 141.1, 59.03,
22.38, 9.8, 3.49
),
lanbda_8 = c(
10.58, 200.2, 95.88, 28.65, 10.28, 4.79, 1.91, 14.85,
200.05, 120.27, 42.58, 15.4, 6.75, 2.37, 18.54, 200.17,
133.91, 53.51, 20.05, 8.6, 2.77, 25.17, 200, 148.96,
69.71, 28.33, 12.15, 3.54, 32.79, 200.16, 159.55, 83.86,
37.07, 16.36, 4.49
)
)
options(
reactable.language = reactable::reactableLang(
sortLabel = "Ordenar {name}",
filterPlaceholder = "",
filterLabel = "Filtrar {name}",
searchPlaceholder = "Buscar",
searchLabel = "Buscar",
noData = "No se encontraron filas",
pageNext = "Siguiente",
pagePrevious = "Anterior",
pageNumbers = "{page} de {pages}",
pageInfo = "{rowStart}–{rowEnd} de {rows} filas",
pageSizeOptions = "Mostrar {rows}",
pageNextLabel = "Página siguiente",
pagePreviousLabel = "Página anterior",
pageNumberLabel = "Página {page}",
pageJumpLabel = "Ir a la página",
pageSizeOptionsLabel = "Filas por página",
groupExpandLabel = "Alternar grupo",
detailsExpandLabel = "Alternar detalles",
selectAllRowsLabel = "Seleccionar todas las filas",
selectAllSubRowsLabel = "Seleccionar todas las filas del grupo",
selectRowLabel = "Seleccionar fila",
defaultGroupHeader = NULL,
detailsCollapseLabel = NULL,
deselectAllRowsLabel = NULL,
deselectAllSubRowsLabel = NULL,
deselectRowLabel = NULL
)
)
reactable::reactable(
lmc_mewma,
columns = list(
p = colDef(
name = "\\( p \\)",
sticky = "left",
align = "right",
style = list(
borderRight = "1px solid #eee", fontWeight = "bold"
),
headerStyle = list(borderRight = "1px solid #eee"),
format = colFormat(
separators = TRUE, digits = 0, locales = "es-ES"
)
),
delta = colDef(
name = "\\( \\delta \\)",
sticky = "left",
align = "right",
style = list(
borderRight = "1px solid #eee", fontWeight = "bold"
),
headerStyle = list(borderRight = "1px solid #eee"),
na = "\\( H = \\)",
format = colFormat(
separators = TRUE, digits = 1, locales = "es-ES"
)
),
lanbda_1 = colDef(
name = "\\( \\textbf{0,05} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
),
lanbda_2 = colDef(
name = "\\( \\textbf{0,10} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
),
lanbda_3 = colDef(
name = "\\( \\textbf{0,20} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
),
lanbda_4 = colDef(
name = "\\( \\textbf{0,30} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
),
lanbda_5 = colDef(
name = "\\( \\textbf{0,40} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
),
lanbda_6 = colDef(
name = "\\( \\textbf{0,50} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
),
lanbda_7 = colDef(
name = "\\( \\textbf{0,60} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
),
lanbda_8 = colDef(
name = "\\( \\textbf{0,80} \\)",
format = colFormat(
separators = TRUE, digits = 2, locales = "es-ES"
)
)
),
columnGroups = list(
colGroup(
name = "\\( \\lambda \\)",
columns = c(
"lanbda_1", "lanbda_2", "lanbda_3",
"lanbda_4", "lanbda_5", "lanbda_6", "lanbda_7",
"lanbda_8"
)
)
),
defaultColDef = colDef(
minWidth = 100,
),
fullWidth = TRUE,
resizable = TRUE,
wrap = FALSE,
bordered = TRUE,
defaultPageSize = 7,
striped = TRUE,
highlight = TRUE,
filterable = TRUE
) #|>
# reactablefmtr::add_source(
# source = reactablefmtr::html(
# "Fuente: La tabla es tomada de <a href='#ref-PrabhuRunger1997'>Prabhu y Runger (1997)</a>"
# ),
# # font_style = "italic",
# align = "left",
# font_size = 12,
# font_color = "gray"
# )
```