+ - 0:00:00
Notes for current slide
Notes for next slide

Plantilla xaringan para rOpenSpain

Para su uso en presentaciones

Diego Hernangómez

2024-01-22

1

Instalación

Para usar esta plantilla, es necesario seguir los siguientes pasos:

  1. Copiar los archivos rOpenSpain.css (link) y rOpenSpain.js(link) en la carpeta de trabajo.

  2. Configurar la presentación xaringan con los siguientes parámetros:

output:
xaringan::moon_reader:
css: [default, rOpenSpain.css]
nature:
beforeInit: "rOpenSpain.js"
...
2

xaringan

/ʃaː.'riŋ.ɡan/

3

Tipografía

Los textos pueden estar en negrita, cursiva, tachado, or código inline.

Link a otra slide.

Lorem Ipsum

Dolor imperdiet nostra sapien scelerisque praesent curae metus facilisis dignissim tortor. Lacinia neque mollis nascetur neque urna velit bibendum. Himenaeos suspendisse leo varius mus risus sagittis aliquet venenatis duis nec.

  • Dolor cubilia nostra nunc sodales

  • Consectetur aliquet mauris blandit

  • Ipsum dis nec porttitor urna sed

4

Colores

Texto

Link

Negrita

Cursiva

Inline

Lorem ipsum dolor sit amet, consectetur adipiscing elit (link), sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Erat nam at lectus urna. Pellentesque elit ullamcorper dignissim cras tincidunt (negrita) lobortis feugiat. Eros donec ac odio tempor (cursiva) orci dapibus ultrices. Id porta nibh venenatis cras sed felis eget velit aliquet. Aliquam id diam maecenas ultricies mi. Enim sit amet color("inline") venenatis urna cursus eget nunc scelerisque viverra.

5

Aspecto importante o Slides Inversas #

Encabezados de slides ##

Subapartados de slides ###

Texto destacado en negrita ####

Esto es un párrafo normal. Usa únicamente encabezados del 1 al 4.

Posible, pero no se recomienda #####
No uses h6 ######
6

Encabezados: Columna izquierda

Primero

Segundo

Tercero

Dolor quis aptent mus a dictum ultricies egestas.

Amet egestas neque tempor fermentum proin massa!

Dolor elementum fermentum pharetra lectus arcu pulvinar.

7

Cambio de sección

8

Cambio de sección

class: inverse center middle
9

Bloques

Citas

Esto es una cita.

Cuando algo es lo suficientemente importante, lo haces incluso si las probabilidades de que salga bien no están a tu favor.

Elon Musk

10

Bloques

Bloques de código

R

ggplot(gapminder) +
aes(x = gdpPercap, y = lifeExp, size = pop, color = country) +
geom_point() +
facet_wrap(~year)

JavaScript

var fun = function lang(l) {
dateformat.i18n = require('./lang/' + l)
return true;
}
11

Bloques

Mas código R

dplyr::starwars %>% dplyr::slice_sample(n = 4)
12

Bloques

message("Soy un mensaje")
## Soy un mensaje
13

Bloques

message("Soy un mensaje")
## Soy un mensaje
warning("Soy un aviso...")
## Warning: Soy un aviso...
14

Bloques

message("Soy un mensaje")
## Soy un mensaje
warning("Soy un aviso...")
## Warning: Soy un aviso...
stop("Tenemos un problema")
## Error in eval(expr, envir, enclos): Tenemos un problema
15

Tablas

tibble::as_tibble(mtcars)
## # A tibble: 32 × 11
## mpg cyl disp hp drat wt qsec vs am gear carb
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 21 6 160 110 3.9 2.62 16.5 0 1 4 4
## 2 21 6 160 110 3.9 2.88 17.0 0 1 4 4
## 3 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1
## 4 21.4 6 258 110 3.08 3.22 19.4 1 0 3 1
## 5 18.7 8 360 175 3.15 3.44 17.0 0 0 3 2
## 6 18.1 6 225 105 2.76 3.46 20.2 1 0 3 1
## 7 14.3 8 360 245 3.21 3.57 15.8 0 0 3 4
## 8 24.4 4 147. 62 3.69 3.19 20 1 0 4 2
## 9 22.8 4 141. 95 3.92 3.15 22.9 1 0 4 2
## 10 19.2 6 168. 123 3.92 3.44 18.3 1 0 4 4
## # ℹ 22 more rows
16

Tablas

knitr::kable(head(mtcars), format = 'html')
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
17

Tablas

DT::datatable(head(mtcars), fillContainer = FALSE, options = list(pageLength = 4))
18

Listas

Una lista simple:

  • Item foo
  • Item bar
  • Item baz
  • Item zip

Y una numerada:

  1. Item one
  2. Item two
  3. Item three
  4. Item four
19

Listas

Lista anidada:

  • nivel 1 item
    • nivel 2 item
    • nivel 2 item
    • nivel 3 item
    • nivel 3 item
  • nivel 1 item
    • nivel 2 item
    • nivel 2 item
    • nivel 2 item
  • nivel 1 item
    • nivel 2 item
    • nivel 2 item
  • nivel 1 item
20

Listas

Mas anidados

  • nivel 1 item (ul)
    1. nivel 2 item (ol)
    2. nivel 2 item (ol)
    • nivel 3 item (ul)
    • nivel 3 item (ul)
  • nivel 1 item (ul)
    1. nivel 2 item (ol)
    2. nivel 2 item (ol)
    • nivel 3 item (ul)
    • nivel 3 item (ul)
    1. nivel 4 item (ol)
    2. nivel 4 item (ol)
    • nivel 3 item (ul)
    • nivel 3 item (ul)
  • nivel 1 item (ul)
21

Gráficos

library(ggplot2)
(g <- ggplot(mpg) + aes(hwy, cty, color = class) + geom_point())

22

Gráficos

library(mapSpain)
country <- esp_get_country()
ggplot(country) +
geom_sf(fill = "cornsilk", color = "#887e6a")

23

Gráficos

HTML Widgets

library(leaflet)
leaflet() %>%
setView(lat = 40.4166, lng = -3.7038400, zoom = 7) %>%
addProviderEspTiles(provider = "IDErioja")
24

Imagen cuadrada

Soy una nota al pie

25

Dos imágenes

26

Gracias

Presentación creada con xaringan

GitHub repo: https://github.com/rOpenSpain/rosxaringan

27

Instalación

Para usar esta plantilla, es necesario seguir los siguientes pasos:

  1. Copiar los archivos rOpenSpain.css (link) y rOpenSpain.js(link) en la carpeta de trabajo.

  2. Configurar la presentación xaringan con los siguientes parámetros:

output:
xaringan::moon_reader:
css: [default, rOpenSpain.css]
nature:
beforeInit: "rOpenSpain.js"
...
2
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow