Estoy creando dos vectores y los estoy sumando, este es mi código:
variable <- 10
variable2 <- 20
suma <- variable + variable2
suma
## [1] 30
Voy a hacer un ejemplo de como graficar.
x <- c(10, 20, 30, 40)
y <- c(2, 10, 8, 10)
plot(x,y)
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.