~/ learn/ afm-112/ cards/ Response on the vertical axis, chosen from the decision
1 of 7

In R, type the plot() call that draws sales against ad spend from the stores frame — ad spend across, sales up, both axes labelled in k$.

In R, type the plot() call that draws sales against ad spend from the stores frame — ad spend across, sales up, both axes labelled in k$.

Answer

plot(storesadspend, storessales, xlab = "Ad spend (k)", ylab = "Sales (k)")

First argument is the horizontal axis. plot(storessales, storesadspend) draws the same points with the axes swapped and no warning.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/4e0c67ae-6c86-440c-8189-f4c400d330d8/flashcard utf-8 LF