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 13-09-20, 3:52 p.m. anita19dsm@gmail.com

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/
14-09-20, 12:15 a.m. sudhakarst


Plot
14-10-20, 2:41 p.m. harshapriya702@gmail.com


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.
22-03-24, 10:34 p.m. indrabhaskarmishra@gmail.com


Click here to reply/comment online