Plot option
When we type plot(Captaincy$y, ratio) in Console window we obtained the graph between year and victory in File & Plots window but when we type plot(Captaincy$names, Captaincy$played), it shows error exclaiming plot function not found. Why it is so?
R Introduction-to-Data-Frames-in-R 02-03 min 10-20 sec
Answers:
Ideally, it should work. You might want to revisit your code. Alternatively, you should follow the approach given on https://forums.spoken-tutorial.org/question/2767/data-frame-plot/
Plot
I think many are facing this problem.
R treats characters for categorical data. To plot characters on the x-axis, you need to convert them into a factor variable. The factor() function achieves this. > x_factor <- factor(names) > plot(x_factor, y). This should Work.