exclude: true <style type="text/css"> code.r{ font-size: 16px; } pre { font-size: 16px !important; } body { text-align: justify} </style> --- class: split-two <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> .column.bg-main1[ .font3[Introducción a R Markdown] </br></br></br></br> .font3[Eduardo Guamán] .font_large[Reporte Interactivo</br> 2019-01-19] </br> .font_large[ <ul class="fa-ul"> <li><i class="fa-li fa fa-envelope" id="icon"></i><a href="mailto:guamandseduardo@gmail.com" target="_blank">guamandseduardo@gmail.com</a></li> <li><i class="fa-li fa fa-linkedin-square" id="icon"></i><a href="https://www.linkedin.com/in/guamandseduardo/" target="_blank">linkedin.com/in/guamandseduardo</a></li> <li><i class="fa-li fa fa-github" id="icon"></i><a href="https://github.com/guamandseduardo" target="_blank">github.com/guamandseduardo</a></li> <li><i class="fa-li fa fa-twitter" id="icon"></i><a href="http://twitter.com/guamandseduardo" target="_blank">@guamandseduardo</a></li> </ul> ] ] .column.bg-main3.center[ </br></br></br></br></br> <img src="imagenes/rmarkdownlogo.png" width=50%> ] --- class: bg-main1 split-two .column[ </br> ##[__R Markdown__](https://rmarkdown.rstudio.com/) es un formato que permite una fácil creación de documentos, presentaciones dinámicas e informes de R. </br></br></br> ##__R Markdown__ admite docenas de formatos de salida estáticos y dinámicos, incluidos HTML, PDF, MS Word, Beamer, diapositivas HTML5, Tufte-style handouts, libros, dashboards, aplicaciones shiny, artículos científicos, sitios web, y otros. ] .column[ <img src="imagenes/RMarkdown2.png", width="100%"> ] --- class: bg-main1 # Instalar R Markdown ### - Instalar el paquete en RStudio ```r install.packages("rmarkdown") ``` ### - Activar el paquete instalado ```r library(rmarkdown) ``` --- class: bg-main1 split-two .column[ ###Para comenzar a utilizar R Markdown, simplemente siga los siguientes pasos: ### 1. `File/New File/R Markdown...`. ### 2. Colocar un título y un nombre de autor. ### 3. Elegir entre los varios tipos de formatos, algunos de los cuales serán de su interés a medida que se acostumbre a usar R Markdown. ### 4. Guardar el archivo .orange[**.Rmd**] en alguna carpeta o proyecto. ### 5. Seleccionar la opción .orange[**knit**] y se generará la salida que eligió. ] .column[ <img src="imagenes/new_markdown.png" width=100%> ] --- class: bg-main1 # DOCUMENTO ESTÁNDAR * Encabezados + `#`, encabezado de nivel 1 + `##`, encabezado de nivel 2 + `###`, encabezado de nivel 3 * Cursiva, Negrita y Ambos - `*cursivo* y _cursivo_`, *cursivo* y _cursivo_ - `**negrita** y __negrita__`, **negrita** y __negrita__ - `***cursivanegrita*** y ___cursivanegrita___`, ***cursivanegrita*** y ___cursivanegrita___ * Listas + Para listas sin orden, usar `*` o `-` para el primer nivel. Para el nivel 2, usar `<tab> +`. + Para listas con orden, usar los números seguidos de un punto `1.`, `2.`, ... * Insertar Imágenes + imagen: `![etiqueta](ruta/de/la/imagen.png)` * Insertar hiperlinks + `[Etiqueta](Link)` --- class: bg-main1 split-two .column[ #Incluir código <br> ###Usa la sintaxis de ___knitr___ para incluir código R en tu informe. R correrá el código e incluirá los resultados cuando genere el documento. ### - Pedazos de código ####Comienza un trozo (chunk) con comillas triples{r} y termina un trozo con comillas triples, para insertar puede usar: el atajo Cmd/Ctrl + Alt + I, botón Insert -> R o manualmente. Los chunks pueden tener nombres. ### - Código incrustado ####Código dentro del texto, usar comillas simple con una r ] .column[ #Opciones para mostrar (chunk) <br> - `eval = TRUE`, Indica si se va a evaluar el código e incluir los resultados. - `echo = TRUE`, Indica si se muestra el código a la par de los resultados. - `message = FALSE`, evita mostrar mensajes en el documento final. - `warning = TRUE`, Indica si se muestran advertencias. - `error = TRUE`, Indica si se muestran errores. - Para mas detalles mira en [yihui.name/knitr/](https://yihui.name/knitr/) ] --- class: bg-main1 ###Tabla predeterminado Hay varios paquetes disponibles para hacer que sus resultados R se vean mejor. Aquí está un data.frame predeterminado: ```r head(mtcars) ``` ``` ## mpg cyl disp hp drat wt qsec vs am gear carb ## Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4 ## Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4 ## Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1 ## Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1 ## Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2 ## Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1 ``` ###Tabla simple (con kable) Se puede comenzar con kable de Knitr para crear tablas simples que se vean mucho mejor: ```r knitr::kable(head(mtcars), format = "html", caption = "Muestra de mtcars") ``` <table> <caption>Muestra de mtcars</caption> <thead> <tr> <th style="text-align:left;"> </th> <th style="text-align:right;"> mpg </th> <th style="text-align:right;"> cyl </th> <th style="text-align:right;"> disp </th> <th style="text-align:right;"> hp </th> <th style="text-align:right;"> drat </th> <th style="text-align:right;"> wt </th> <th style="text-align:right;"> qsec </th> <th style="text-align:right;"> vs </th> <th style="text-align:right;"> am </th> <th style="text-align:right;"> gear </th> <th style="text-align:right;"> carb </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;"> Mazda RX4 </td> <td style="text-align:right;"> 21.0 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 160 </td> <td style="text-align:right;"> 110 </td> <td style="text-align:right;"> 3.90 </td> <td style="text-align:right;"> 2.620 </td> <td style="text-align:right;"> 16.46 </td> <td style="text-align:right;"> 0 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 4 </td> </tr> <tr> <td style="text-align:left;"> Mazda RX4 Wag </td> <td style="text-align:right;"> 21.0 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 160 </td> <td style="text-align:right;"> 110 </td> <td style="text-align:right;"> 3.90 </td> <td style="text-align:right;"> 2.875 </td> <td style="text-align:right;"> 17.02 </td> <td style="text-align:right;"> 0 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 4 </td> </tr> <tr> <td style="text-align:left;"> Datsun 710 </td> <td style="text-align:right;"> 22.8 </td> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 108 </td> <td style="text-align:right;"> 93 </td> <td style="text-align:right;"> 3.85 </td> <td style="text-align:right;"> 2.320 </td> <td style="text-align:right;"> 18.61 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 4 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:left;"> Hornet 4 Drive </td> <td style="text-align:right;"> 21.4 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 258 </td> <td style="text-align:right;"> 110 </td> <td style="text-align:right;"> 3.08 </td> <td style="text-align:right;"> 3.215 </td> <td style="text-align:right;"> 19.44 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 0 </td> <td style="text-align:right;"> 3 </td> <td style="text-align:right;"> 1 </td> </tr> <tr> <td style="text-align:left;"> Hornet Sportabout </td> <td style="text-align:right;"> 18.7 </td> <td style="text-align:right;"> 8 </td> <td style="text-align:right;"> 360 </td> <td style="text-align:right;"> 175 </td> <td style="text-align:right;"> 3.15 </td> <td style="text-align:right;"> 3.440 </td> <td style="text-align:right;"> 17.02 </td> <td style="text-align:right;"> 0 </td> <td style="text-align:right;"> 0 </td> <td style="text-align:right;"> 3 </td> <td style="text-align:right;"> 2 </td> </tr> <tr> <td style="text-align:left;"> Valiant </td> <td style="text-align:right;"> 18.1 </td> <td style="text-align:right;"> 6 </td> <td style="text-align:right;"> 225 </td> <td style="text-align:right;"> 105 </td> <td style="text-align:right;"> 2.76 </td> <td style="text-align:right;"> 3.460 </td> <td style="text-align:right;"> 20.22 </td> <td style="text-align:right;"> 1 </td> <td style="text-align:right;"> 0 </td> <td style="text-align:right;"> 3 </td> <td style="text-align:right;"> 1 </td> </tr> </tbody> </table> --- ## Tablas con KableExtra Se puede usar kableExtra para hacer algunas cosas más divertidas y elegantes. ```r library(tidyverse) library(kableExtra) mtcars %>% slice(1:10) %>% arrange(mpg) %>% round(2) %>% mutate(mpg = factor(mpg)) %>% mutate_if(is.numeric, function(x) { cell_spec(x, bold = T, color = spec_color(x, end = 0.9, option = 'plasma', direction = -1), font_size = spec_font_size(x)) }) %>% mutate(mpg = cell_spec( mpg, color = 'white', bold = T, background = spec_color(1:10, end = 0.9, option = 'viridis', direction = -1) )) %>% kable(format='html', escape = F, align = 'c') %>% kable_styling(c('condensed', 'basic'), full_width = F, position='left') ``` La salida de la tabla se muestra en la siguiente diapositiva... --- ## Tablas con KableExtra <center> <table class="table table-condensed" style="width: auto !important; "> <thead> <tr> <th style="text-align:center;"> mpg </th> <th style="text-align:center;"> cyl </th> <th style="text-align:center;"> disp </th> <th style="text-align:center;"> hp </th> <th style="text-align:center;"> drat </th> <th style="text-align:center;"> wt </th> <th style="text-align:center;"> qsec </th> <th style="text-align:center;"> vs </th> <th style="text-align:center;"> am </th> <th style="text-align:center;"> gear </th> <th style="text-align:center;"> carb </th> </tr> </thead> <tbody> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(187, 223, 39, 1);">14.3</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">8</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">360</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">245</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(214, 85, 109, 1);font-size: 11px;">3.21</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">3.57</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">15.84</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">3</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(123, 209, 81, 1);">18.1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(191, 57, 132, 1);font-size: 12px;">6</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(199, 66, 124, 1);font-size: 12px;">225</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(240, 128, 79, 1);font-size: 10px;">105</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">2.76</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(56, 4, 154, 1);font-size: 15px;">3.46</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(159, 25, 157, 1);font-size: 13px;">20.22</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">3</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">1</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(66, 190, 113, 1);">18.7</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">8</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">360</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(160, 26, 156, 1);font-size: 13px;">175</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(224, 99, 99, 1);font-size: 11px;">3.15</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(63, 4, 156, 1);font-size: 15px;">3.44</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(248, 148, 65, 1);font-size: 9px;">17.02</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">3</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(225, 100, 98, 1);font-size: 11px;">2</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(34, 168, 132, 1);">19.2</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(191, 57, 132, 1);font-size: 12px;">6</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(240, 128, 79, 1);font-size: 10px;">167.6</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(225, 100, 98, 1);font-size: 11px;">123</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">3.92</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(63, 4, 156, 1);font-size: 15px;">3.44</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(222, 96, 101, 1);font-size: 11px;">18.3</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(33, 145, 140, 1);">21</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(191, 57, 132, 1);font-size: 12px;">6</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(244, 136, 73, 1);font-size: 10px;">160</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(236, 119, 84, 1);font-size: 10px;">110</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(24, 6, 139, 1);font-size: 16px;">3.9</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(240, 127, 79, 1);font-size: 10px;">2.62</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(253, 175, 49, 1);font-size: 9px;">16.46</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(42, 120, 142, 1);">21</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(191, 57, 132, 1);font-size: 12px;">6</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(244, 136, 73, 1);font-size: 10px;">160</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(236, 119, 84, 1);font-size: 10px;">110</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(24, 6, 139, 1);font-size: 16px;">3.9</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(203, 70, 121, 1);font-size: 12px;">2.88</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(248, 148, 65, 1);font-size: 9px;">17.02</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(53, 96, 141, 1);">21.4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(191, 57, 132, 1);font-size: 12px;">6</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(166, 32, 152, 1);font-size: 13px;">258</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(236, 119, 84, 1);font-size: 10px;">110</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(235, 117, 87, 1);font-size: 10px;">3.08</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(129, 4, 167, 1);font-size: 14px;">3.21</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(189, 54, 134, 1);font-size: 12px;">19.44</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">3</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">1</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(65, 68, 135, 1);">22.8</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">108</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(248, 148, 65, 1);font-size: 9px;">93</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(45, 5, 149, 1);font-size: 16px;">3.85</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">2.32</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(213, 84, 109, 1);font-size: 11px;">18.61</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">1</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(72, 36, 117, 1);">22.8</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(251, 161, 57, 1);font-size: 9px;">140.8</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(247, 144, 68, 1);font-size: 9px;">95</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">3.92</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(145, 14, 163, 1);font-size: 13px;">3.15</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">22.9</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(225, 100, 98, 1);font-size: 11px;">2</span> </td> </tr> <tr> <td style="text-align:center;"> <span style=" font-weight: bold; color: white;border-radius: 4px; padding-right: 4px; padding-left: 4px; background-color: rgba(68, 1, 84, 1);">24.4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(249, 153, 62, 1);font-size: 9px;">146.7</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">62</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(99, 0, 167, 1);font-size: 14px;">3.69</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(135, 7, 166, 1);font-size: 14px;">3.19</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(167, 33, 150, 1);font-size: 13px;">20</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">1</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(252, 206, 37, 1);font-size: 8px;">0</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(13, 8, 135, 1);font-size: 16px;">4</span> </td> <td style="text-align:center;"> <span style=" font-weight: bold; color: rgba(225, 100, 98, 1);font-size: 11px;">2</span> </td> </tr> </tbody> </table> </center> --- ## Tabla con DT Para mayor interactividad y más opciones para jugar, considere el paquete `DT`. ```r DT::datatable(mtcars, extensions = 'ColReorder', options = list(colReorder = TRUE, pageLength = 5)) ```
--- class: bg-main1 # Gráfico de barras con ggplot2 y plotly <center>
</center> --- class: bg-main1 .center.white[ # Gracias! ] </br> .center[<img src="imagenes/gracias.png" width=40%>] </br></br> .corner-box.top-center[Contacto: @guamandseduardo o guamandseduardo@gmail.com]