Crear el documento R markdown
File > New file > R Markdown… > Presentation
Introducir título (Title) y autor (Author)
Elegir el formato deseado: ioslides, slidy, beamer
install.packages('revealjs')
File > New File > R Markdown… > From Template > Reveal.js Presentation (HTML)
---
title: "Presentación con ioslides"
author: "Grupo R"
date: "22 de mayo de 2017"
output: ioslides_presentation
---
---
title: "Presentación con ioslides"
author: "Grupo R Madrid"
date: "21 de mayo de 2017"
output:
ioslides_presentation:
incremental: false
self-included: true
---
hightlight: tango / pygments / kate / monochrome / espresso / zenburn / haddock
df_print: kable / tibble / paged (ioslides)
css: style.css
self-contained: true / false
lib-dir: libs
incremental: false / true
widescreen: false / true
smaller: false / true
keep_tex: false / true
keep_md: false / true
{r, echo=TRUE, eval=FALSE, fig.align='center', warning=FALSE}
library(viridis)
library(ggplot2)
library(hexbin)
ggplot(data.frame(x = rnorm(10000), y = rnorm(10000)), aes(x = x, y = y)) +
geom_hex() + coord_fixed() +
scale_fill_viridis() + theme_bw()
library(magrittr)
library(highcharter)
highchart() %>%
hc_title(text = "Scatter chart with size and color") %>%
hc_add_series_scatter(mtcars$wt, mtcars$mpg,
mtcars$drat, mtcars$hp)
library(ggplot2)
# Use fixed-width bins
ggplot(mtcars, aes(x = mpg)) +
geom_dotplot(method="histodot", binwidth = 1.5)
##
## Call:
## lm(formula = weight ~ group - 1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0710 -0.4938 0.0685 0.2462 1.3690
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## groupCtl 5.0320 0.2202 22.85 9.55e-15 ***
## groupTrt 4.6610 0.2202 21.16 3.62e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6964 on 18 degrees of freedom
## Multiple R-squared: 0.9818, Adjusted R-squared: 0.9798
## F-statistic: 485.1 on 2 and 18 DF, p-value: < 2.2e-16
Probabilidad binomial:
\[f(y|N,p) = {{N}\choose{y}} \cdot p^y \cdot (1-p)^{N-y}\]
n <- 100
x <- rnorm(n)
y <- 2*x + rnorm(n)
out <- lm(y ~ x)
library(knitr)
kable(summary(out)$coef, digits=2)
Estimate | Std. Error | t value | Pr(>|t|) | |
---|---|---|---|---|
(Intercept) | -0.15 | 0.10 | -1.47 | 0.14 |
x | 2.05 | 0.09 | 21.71 | 0.00 |