runr / global.R
pajuan's picture
Update global.R
e54ec21 verified
raw
history blame contribute delete
791 Bytes
library(shiny)
library(shinyAce)
modes <- getAceModes()
themes <- getAceThemes()
foo <- function() {
pb <- progress_bar$new(
format = " [:bar] :current/:total (:percent) eta: :eta",
total = 5, clear = FALSE)
for(i in 1:5) {
pb$tick()
Sys.sleep(1)
}
}
init <- "
## Seccion 1
Abrir Help menu = F1
#
Usted puede incluir chunks con operaciones, abajo un ejemplo.
```{r}
2*3
```
```{r}
x <- rnorm(n=50)
head(x)
mean(x)
```
## Seccion 2
you can use datasets and some libraries
```{r}
library(magrittr)
library(datasets)
data(iris)
```
```{r}
knitr::kable(head(iris))
```
```{r}
iris %>%
group_by(Species) %>%
summarise(mean = mean(Sepal.Length), sd = sd(Sepal.Length))
```
## Sección 3
Now it's your turn, build a simple chunk.
```{r}
# Write here something
```
"