PLEASE HELP. I am new to R studio and have to make a plot. I keep running this code, "plot(datasurvey$expected_grade, main="Expected Grades of Students", xlab="Student index", ylab= "expected grade", col="red") which I know is in correct formal. I keep getting back the error message every single time I plot something, "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". No idea what this means. This is the code I am running. duration,section,age,sex,height,major,computer,research,grad_school,stats_experience,stats_comfort,course_comfort,expected_grade,coding_experience,R_anxiety,COVID,online_feeling
755,Asynchronous,19,Male,69,History,Mac,Maybe,Maybe,4,2,2,A,2,7,3,3
396,Asynchronous,19,Female,63,History ,PC,Maybe,Yes,5,5,4,A,1,3,3,2
1625,Synchronous,19,Female,58,English,Other,No,Yes,5,3,3,B,2,5,3,2
550,Asynchronous,20,Female,63,Biology ,Mac,Yes,Yes,3,3,2,A,3,6,2,3
307,Asynchronous,19,Female,60,"Speech, Language, and Hearing ",Mac,Yes,Yes,4,4,5,B,1,6,3,3
438,Asynchronous,18,Female,62,"Speech, Language, and Hearing ",PC,Maybe,Yes,4,3,3,A,1,5,2,3
1023,Synchronous,21,Female,67,English,Mac,Maybe,Yes,5,4,2,A,1,3,2,3
1884,Synchronous,20,Female,64,Government and Mexican American Studies,PC,No,No,5,5,6,B,1,5,4,5
1658,Synchronous,19,Female,62,Journalism,Mac,Maybe,No,5,4,5,B,1,3,2,3
787,Synchronous,22,Female,62,Rhetoric & Writing ,Mac,Yes,No,5,3,2,B,2,3,5,3
563,Asynchronous,20,Female,59,Communication Sciences and Disorders,Mac,Maybe,Yes,5,5,5,A,1,3,3,3
734,Synchronous,21,Female,65,Psychology,Mac,Yes,Yes,4,5,7,B,1,3,3,3
1194,Asynchronous,20,Male,73,"Business Honors, Finance, Mathematics",PC,Yes,Yes,3,2,2,A,2,7,2,3
491,Asynchronous,22,Female,60,"Economics, Government",Mac,Yes,Yes,1,1,2,A,1,6,5,5
1399,Asynchronous,19,Female,62,Radio-TV-Film,Mac,Maybe,Yes,5,3,1,A,1,3,3,3
2076,Asynchronous,18,Male,72,Radio-TV-Film,PC,Maybe,Maybe,5,3,2,B,2,6,3,3
545,Asynchronous,20,Female,65,Psychology,Mac,Yes,Yes,3,3,3,A,2,3,4,5
570,Asynchronous,20,Male,72,Sport Management ,Mac,No,Yes,5,5,5,B,1,5,2,5
1067,Asynchronous,21,Female,64,Sport Management ,Mac,Maybe,Maybe,5,5,6,B,1,3,4,5
565,Asynchronous,18,Male,69,Physical Culture and Sports,Mac,Maybe,No,3,2,2,A,1,6,3,5
369,Asynchronous,31,Male,69,Human Ecology,Mac,No,No,3,3,2,A,2,6,4,2
421,Synchronous,19,Female,63,History,PC,Maybe,Yes,5,5,5,A,1,6,3,2
381,Asynchronous,21,Female,65,Sociology,Mac,Maybe,Yes,2,2,2,A,3,6,4,3
390,Synchronous,20,Female,68,Undeclared,Mac,Maybe,Yes,5,4,5,A,1,5,2,3
989,Asynchronous,21,Female,66,Studio Art,Mac,No,Maybe,4,4,3,B,1,6,3,3
418,Synchronous,19,Female,63,Theatre and Dance,Mac,No,Maybe,5,4,5,A,1,3,2,3
399,Synchronous,21,Female,67,SLH,PC,Yes,Yes,4,4,3,A,1,3,5,3
268,Asynchronous,21,Female,67,Government,Mac,No,Yes,3,2,3,A,1,3,2,3
470,Asynchronous,19,Female,62,Psychology,Other,Maybe,Maybe,3,3,5,A,1,3,2,3
553,Asynchronous,22,Female,64,Studio Art,Mac,Yes,Yes,5,3,3,A,1,7,3,3
214,Asynchronous,20,Female,62,Management Information Systems,Mac,Maybe,Yes,4,4,3,A,2,3,3,2
658,Asynchronous,19,Female,59,Deafness Studies/Deaf Education,PC,Maybe,Maybe,5,3,5,A,1,3,3,2
163,Asynchronous,21,Male,59,Biology,PC,Yes,Yes,3,3,3,A,1,6,3,2
285,Asynchronous,22,Female,63,Sociology,Mac,Maybe,Yes,4,2,5,A,1,3,3,5
1192,Synchronous,21,Female,62,Health & Society,PC,Yes,Yes,3,3,5,A,1,5,3,3
319,Synchronous,19,Female,63,"Speech, Language, and Hearing Science",Mac,Maybe,Yes,5,3,3,A,1,6,2,3
486,Synchronous,21,Female,67,Radio-TV-Film,Mac,Maybe,No,3,4,5,B,1,3,3,2
498,Synchronous,20,Female,66,"Speech, Language, and Hearing ",Mac,Maybe,Maybe,4,3,4,A,1,5,2,2
515,Synchronous,19,Female,62,Health & Society,PC,Maybe,Yes,4,4,3,B,2,5,5,3
707,Synchronous,19,Female,60,Corporate Communication,Mac,Maybe,Maybe,4,3,2,A,1,6,3,2
411,Synchronous,21,Female,64,Communication and Leadership ,Mac,Yes,Yes,5,5,3,A,1,7,3,2
462,Synchronous,20,Female,62,Social Work,Mac,Maybe,Yes,4,5,7,B,1,5,3,5
491,Synchronous,19,Female,67,Government,PC,Maybe,Yes,5,3,4,B,1,5,3,2
621,Synchronous,19,Female,65,Speech Pathology,PC,Yes,Yes,5,3,4,B,2,5,3,2
428,Synchronous,21,Male,74,Radio-TV-Film,PC,Maybe,No,4,3,3,B,1,3,2,2
384,Synchronous,19,Female,64,interpersonal communications (comm studies),Mac,Yes,Yes,3,2,2,A,1,7,3,5
449,Synchronous,19,Female,63,Communication Studies ,Mac,Maybe,Maybe,3,3,3,A,1,3,4,3
508,Synchronous,18,Male,75,Undeclared,PC,Maybe,Yes,4,3,2,A,1,6,2,4
1408,Synchronous,19,Female,64,Theatre,Mac,Yes,Maybe,3,3,4,B,1,3,3,4
3886,Synchronous,20,Female,63,Health and Society,Mac,Yes,Yes,4,3,5,A,1,5,3,2
2995,Asynchronous,27,Female,65,Social Work,Mac,No,Yes,3,4,2,A,1,3,3,3
328,Asynchronous,20,Female,65,Psychology,Mac,Yes,Yes,2,2,1,A,2,3,3,3
3200,Synchronous,20,Female,60,Psychology,PC,Maybe,Yes,4,2,5,A,1,5,4,3
505,Synchronous,19,Female,63,Sociology,PC,Yes,Yes,3,3,3,A,2,3,2,3
744,Synchronous,20,Male,70,Biology,PC,No,No,3,2,1,A,2,6,2,4
522,Synchronous,20,Male,75,Classical Languages/Classical Archaeology,Mac,Yes,Yes,4,3,3,A,2,4,2,5
436,Asynchronous,21,Female,64,Social Work,PC,Maybe,Yes,5,3,5,C,1,3,2,3
2500,Asynchronous,21,Female,64,Speech-Language Pathology,Mac,Maybe,Yes,3,2,4,A,1,3,3,3
583,Asynchronous,21,Female,61,Psychology,PC,Maybe,Yes,3,1,1,A,2,1,2,3
1145,Asynchronous,21,Female,64,Sport management,Mac,Maybe,Maybe,5,5,6,B,1,3,3,2
447,Synchronous,19,Female,64,IRG ,Mac,Maybe,Maybe,5,4,5,B,1,5,4,3
809,Synchronous,21,Female,70,Sociology ,Mac,Yes,Maybe,3,3,3,B,1,6,3,3
1871,Synchronous,21,Female,62,Government ,Mac,Yes,Yes,3,2,4,A,1,3,4,3
287,Synchronous,20,Female,64,Sociology ,Mac,Yes,Maybe,5,4,5,B,1,6,4,2
1028,Asynchronous,19,Male,73,Radio-Television-Film,PC,Maybe,Maybe,5,3,3,A,1,3,4,5
336,Asynchronous,20,Female,68,Government,Mac,Yes,Yes,3,2,2,A,1,3,3,3
879,Asynchronous,19,Female,61,Undeclared,PC,Maybe,No,4,4,3,B,1,3,4,2
379,Synchronous,19,Male,71,Undeclared,Mac,Maybe,Maybe,3,3,3,B,2,6,3,2
549,Synchronous,19,Male,72,Education ,Mac,Maybe,Maybe,4,4,5,A,1,3,4,3
392,Asynchronous,22,Female,61,Human Development and Family Sciences ,Mac,Maybe,Maybe,3,2,2,A,1,6,3,3
995,Asynchronous,21,Male,72,Theatre & Dance,Mac,Maybe,No,4,4,5,B,1,5,5,5
1312,Asynchronous,19,Female,68,Public Relations ,Mac,Yes,Yes,5,3,3,A,1,3,2,4
210,Synchronous,20,Female,67,HDO,Mac,Maybe,Yes,4,5,5,C,1,7,2,2
337,Synchronous,20,Male,67,Sociology,Mac,Yes,Yes,4,3,4,B,2,1,2,2
datasurvey$expected_grade is a character vector. You can make it a bar chart by converting to a factor
plot(datasurvey$expected_grade,
main="Expected Grades of Students",
xlab="Student index",
ylab= "expected grade",
col="red")
or a scatterplot by converting to numical
plot(as.numeric(as.factor(datasurvey$expected_grade)),
main="Expected Grades of Students",
xlab="Student index",
ylab= "expected grade",
col="red")