This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.
plot(cars)

Add a new chunk by clicking the Insert Chunk button on the toolbar or by pressing Ctrl+Alt+I.
cars
El siguiente bloque de codigo crea el histograma de frecuencia de valores de la variable speed del objeto cars:
hist(cars$speed)
el siguiente bloque de codigo crea el histograma de frecuencia de valores de la variable dist del objeto cars:
hist(cars$dist)
el siguiente bloque de codigo crea el coeficiente de correlacion entre dist y speed:
cor(cars$speed,cars$dist)
## [1] 0.8068949
el siguiente bloque de codigo crea el coeficiente de correlacion entre speed y dist:
plot(cars$speed,cars$dist)