My R Studio does not show plot when we mingle character type X Axis data and Number type Y Axis Data.
Title
Question
My R Studio, though it accepts the command
>plot(captaincy$played, captaincy$won),
it does not accept the command like
>plot(captaincy$names,captaincy$played)......wherein names are in CHARACTER TYPE and PLAYED are in NUM Type.
It does not show the plot at all...and returns a warning message only.....
Kindly help me what to do?
Monika Singh
R Introduction-to-Data-Frames-in-R 06-07 min 50-60 sec
Answers:
One cannot plot strings until they convert it into a factor. Convert the strings into a factor and you are good to go.
>plot(factor(captaincy$names),captaincy$played)
Login to add comment