plot(cars)

El siguiente bloque de codigo crea el histograma de frecuencia de valores de la variable speed del objeto cars:

cars
hist(cars$speed)

hist(cars$dist)

cor(cars$speed,cars$dist)
## [1] 0.8068949
plot(cars$speed,cars$dist)

The preview shows you a rendered HTML copy of the contents of the editor. Consequently, unlike Knit, Preview does not run any R code chunks. Instead, the output of the chunk when it was last run in the editor is displayed.