Update global.R
Browse files
global.R
CHANGED
@@ -1,33 +1,80 @@
|
|
1 |
-
library(shiny)
|
2 |
-
library(shinyAce)
|
3 |
-
modes <- getAceModes()
|
4 |
-
themes <- getAceThemes()
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
foo <- function() {
|
9 |
-
pb <- progress_bar$new(
|
10 |
-
format = " [:bar] :current/:total (:percent) eta: :eta",
|
11 |
-
total = 5, clear = FALSE)
|
12 |
-
for(i in 1:5) {
|
13 |
-
pb$tick()
|
14 |
-
Sys.sleep(1)
|
15 |
-
}
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
library(shiny)
|
2 |
+
library(shinyAce)
|
3 |
+
modes <- getAceModes()
|
4 |
+
themes <- getAceThemes()
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
foo <- function() {
|
9 |
+
pb <- progress_bar$new(
|
10 |
+
format = " [:bar] :current/:total (:percent) eta: :eta",
|
11 |
+
total = 5, clear = FALSE)
|
12 |
+
for(i in 1:5) {
|
13 |
+
pb$tick()
|
14 |
+
Sys.sleep(1)
|
15 |
+
}
|
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 |
+
```{r}
|
32 |
+
x <- rnorm(n=50)
|
33 |
+
head(x)
|
34 |
+
mean(x)
|
35 |
+
```
|
36 |
+
|
37 |
+
## Seccion 2
|
38 |
+
|
39 |
+
you can load datasets and libraries
|
40 |
+
|
41 |
+
```{r}
|
42 |
+
library(magrittr)
|
43 |
+
library(datasets)
|
44 |
+
data(iris)
|
45 |
+
```
|
46 |
+
|
47 |
+
```{r}
|
48 |
+
knitr::kable(head(iris))
|
49 |
+
```
|
50 |
+
|
51 |
+
```{r}
|
52 |
+
iris %>%
|
53 |
+
group_by(Species) %>%
|
54 |
+
summarise(mean = mean(Sepal.Length), sd = sd(Sepal.Length))
|
55 |
+
|
56 |
+
```
|
57 |
+
## Seccion 3
|
58 |
+
|
59 |
+
you also can make graphics
|
60 |
+
|
61 |
+
```{r}
|
62 |
+
plot(iris$Sepal.Length, iris$Sepal.Width)
|
63 |
+
```
|
64 |
+
|
65 |
+
```{r}
|
66 |
+
library(ggplot2)
|
67 |
+
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species)) +
|
68 |
+
geom_point()
|
69 |
+
```
|
70 |
+
## Secci贸n 4
|
71 |
+
|
72 |
+
Ahora es su turno, construya un chunk sencillo.
|
73 |
+
|
74 |
+
```{r}
|
75 |
+
# Escriba aqui algo
|
76 |
+
```
|
77 |
+
|
78 |
+
|
79 |
+
"
|
80 |
+
|