# Matriz de diagramas de dispersión (scatterplot)
# cargando "cars - cars.csv" a consola de R
cars = read.csv("C:/Users/Administrator/Desktop/cars - cars.csv", header = T)
# mostrando primeras 6 filas de "cars"
head(cars)
mpg cylinders displacement horsepower weight acceleration year origin
1 18 8 307 130 3504 12.0 70 1
2 15 8 350 165 3693 11.5 70 1
3 18 8 318 150 3436 11.0 70 1
4 16 8 304 150 3433 12.0 70 1
5 17 8 302 140 3449 10.5 70 1
6 15 8 429 198 4341 10.0 70 1
# paquete necesario
require(lattice)
Loading required package: lattice
# visualizando 9 variables
splom( ~ cars)
# visualizando 3 variables
splom(~cars[1:3])
No hay comentarios.:
Publicar un comentario