When plotting a categorical variable, R will automatically produce a bar chart.
In the plot() function, the first argument refers to data on the vertical axis and the second argument refers to data on the horizontal axis.
Plotting 2 categorical variables and plotting 2 continuous variables in R, produce the same results.
When plotting a continuous variable, R will produce an index plot.