Esta es mi primera visualización
# Bloque de Código
library(readr)
data <- read_csv2("anscombe.csv")
## ℹ Using "','" as decimal and "'.'" as grouping mark. Use `read_delim()` for more control.
## Rows: 44 Columns: 3
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ";"
## dbl (3): Set, X, Y
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#str(data)
data$Set <- as.factor(data$Set)
#str(data)
plot(data)
library(ggplot2)
# Lienzo
lienzo <- ggplot(data, aes(x = X, y = Y))
lienzo <- lienzo + geom_point(aes(color=Set))
lienzo <- lienzo + geom_smooth(method="lm", se=FALSE)
lienzo <- lienzo + facet_wrap(~Set)
lienzo
## `geom_smooth()` using formula = 'y ~ x'