data ("iris")
summary ("iris")
## Length Class Mode
## 1 character character
En la anterior tabla, se presentan las estadisticas descriptivas, del documento de datos iris, donde se observan 50 muestras por cada especie.
library(ggplot2)
ggplot(iris, aes(x=Sepal.Length))+
geom_histogram(fill="pink")
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ggplot(iris, aes(x=Sepal.Width))+
geom_histogram(fill="yellow")
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ggplot(iris, aes(x=Petal.Length))+
geom_histogram(fill="lightblue")
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ggplot(iris, aes(x=Petal.Width))+
geom_histogram(fill="orange")
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ggplot(iris, aes(x=Sepal.Length))+
geom_boxplot(fill="pink")
ggplot(iris, aes(x=Sepal.Width))+
geom_boxplot(fill="yellow")
ggplot(iris, aes(x=Petal.Length))+
geom_boxplot(fill="lightblue")
ggplot(iris, aes(x=Petal.Width))+
geom_boxplot(fill="orange")
###Una variable numerica y otra cualitativa
ggplot(iris, aes(y=Sepal.Length, x=Species, fill = Species))+
geom_boxplot()