Barcharts_01

Column

barplot()

Column

ggplot2

Column

lattice

Barcharts_02

Column

BarCharts_03

Column

BarCharts_04

Column

BarCharts_05

barplot()

ggplot2

lattice

---
title: "Bar Charts"
output: 
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    social: menu
    source: embed
---

```{r setup, include=FALSE}
library(flexdashboard)

library(ggplot2)

library(lattice)
```


# Barcharts_01 {data-icon="fa-chart-bar"}

Column {data-width=333}
-----------------------------------------------------------------------

### barplot()

```{r barplot,fig.align='center'}
x <- table(mtcars$cyl)

colores <- c("orange","blue","purple")

barplot(x,xlab="Cilindros",ylab="Frecuencias",main="Número de Cilindros",col=colores)
```

Column {data-width=333}
-----------------------------------------------------------------------

### ggplot2

```{r ggplot2,fig.align='center'}
ggplot(mtcars,aes(cyl)) + geom_bar(fill=colores) + labs(x="Cilindros",y="Frecuencias",title="Número de Cilindros") + theme_dark()
```

Column {data-width=333}
-----------------------------------------------------------------------

### lattice

```{r lattice,fig.align='center'}
barchart(x,xlab="Cilindros",ylab="Frecuencias",main="Número de Cilindros",col=colores,horizontal = FALSE)

```


# Barcharts_02 {data-icon="fa-chart-bar"}

Column {data-width=1000}
--------------------------------------------------------------------------

```{r barplot_01,fig.align='center'}
x <- table(mtcars$cyl)

colores <- c("orange","blue","purple")

barplot(x,xlab="Cilindros",ylab="Frecuencias",main="Número de Cilindros",col=colores)
```



# BarCharts_03 {data-icon="fa-chart-bar"}


Column {data-width=1000}
----------------------------------------------------------------------------

```{r ggplot2_01,fig.align='center'}
ggplot(mtcars,aes(cyl)) + geom_bar(fill=colores) + labs(x="Cilindros",y="Frecuencias",title="Número de Cilindros") + theme_dark()
```



# BarCharts_04 {data-icon="fa-chart-bar"}


Column {data-width=1000}
------------------------------------------------------------------------------

```{r lattice_01,fig.align='center'}
barchart(x,xlab="Cilindros",ylab="Frecuencias",main="Número de Cilindros",col=colores,horizontal = FALSE)
```


# BarCharts_05 {data-icon="fa-chart-bar"}


## {.tabset}

### barplot()

```{r barplot_02,fig.align='center'}
x <- table(mtcars$cyl)

colores <- c("orange","blue","purple")

barplot(x,xlab="Cilindros",ylab="Frecuencias",main="Número de Cilindros",col=colores)
```

### ggplot2

```{r ggplot2_02,fig.align='center'}
ggplot(mtcars,aes(cyl)) + geom_bar(fill=colores) + labs(x="Cilindros",y="Frecuencias",title="Número de Cilindros") + theme_dark()
```

### lattice

```{r lattice_02,fig.align='center'}
barchart(x,xlab="Cilindros",ylab="Frecuencias",main="Número de Cilindros",col=colores,horizontal = FALSE)
```