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
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/