Update global.R
Browse files
global.R
CHANGED
@@ -16,20 +16,46 @@ foo <- function() {
|
|
16 |
}
|
17 |
init <- "
|
18 |
## Seccion 1
|
19 |
-
|
20 |
Abrir Help menu = F1
|
21 |
-
|
22 |
#
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
Usted puede incluir chunks con operaciones, abajo un ejemplo.
|
27 |
-
|
28 |
```{r}
|
29 |
2*3
|
30 |
```
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
"
|
35 |
|
|
|
16 |
}
|
17 |
init <- "
|
18 |
## Seccion 1
|
|
|
19 |
Abrir Help menu = F1
|
|
|
20 |
#
|
|
|
|
|
|
|
21 |
Usted puede incluir chunks con operaciones, abajo un ejemplo.
|
|
|
22 |
```{r}
|
23 |
2*3
|
24 |
```
|
25 |
+
```{r}
|
26 |
+
x <- rnorm(n=50)
|
27 |
+
head(x)
|
28 |
+
mean(x)
|
29 |
+
```
|
30 |
+
## Seccion 2
|
31 |
+
you can load datasets and libraries
|
32 |
+
```{r}
|
33 |
+
library(magrittr)
|
34 |
+
library(datasets)
|
35 |
+
data(iris)
|
36 |
+
```
|
37 |
+
```{r}
|
38 |
+
knitr::kable(head(iris))
|
39 |
+
```
|
40 |
+
```{r}
|
41 |
+
iris %>%
|
42 |
+
group_by(Species) %>%
|
43 |
+
summarise(mean = mean(Sepal.Length), sd = sd(Sepal.Length))
|
44 |
+
```
|
45 |
+
## Seccion 3
|
46 |
+
you also can make graphics
|
47 |
+
```{r}
|
48 |
+
plot(iris$Sepal.Length, iris$Sepal.Width)
|
49 |
+
```
|
50 |
+
```{r}
|
51 |
+
library(ggplot2)
|
52 |
+
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
|
53 |
+
geom_point()
|
54 |
+
```
|
55 |
+
## Secci贸n 4
|
56 |
+
Ahora es su turno, construya un chunk sencillo.
|
57 |
+
```{r}
|
58 |
+
# Escriba aqui algo
|
59 |
+
```
|
60 |
"
|
61 |
|