saving . . . saved plot(captaincy$names,captaincy$played) has been deleted. plot(captaincy$names,captaincy$played) has been hidden .
plot(captaincy$names,captaincy$played)
Title
Question
Error in the 
plot(captaincy$names,captaincy$played)

Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf


R Introduction-to-Data-Frames-in-R 12-13 min 30-40 sec 01-05-20, 10:18 p.m. Navneetsandhu

Answers:

Please note that the plot() function simply plots two vectors against each other. Like plot(c(1:4),c(1,4,9,16)). 
In your case, it seems you wish to draw a barplot. For this, please type the commands as given below:

barplot(captaincy$played, names.arg = captaincy$names)
02-05-20, 12:07 a.m. sudhakarst
Thanks Sir
02-05-20, 10:12 a.m. Navneetsandhu
what it means names.arg command
12-05-20, 4:15 p.m. preetityagi

Login to add comment


Log-in to answer to this question.