Please answer in R programming: Example of 3 of the 30 student files: Courses,Score CS1410,92 CS2410,80 CS3300,91 CS2304

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Please answer in R programming: Example of 3 of the 30 student files: Courses,Score CS1410,92 CS2410,80 CS3300,91 CS2304

Post by answerhappygod »

Please answer in R programming:
Please Answer In R Programming Example Of 3 Of The 30 Student Files Courses Score Cs1410 92 Cs2410 80 Cs3300 91 Cs2304 1
Please Answer In R Programming Example Of 3 Of The 30 Student Files Courses Score Cs1410 92 Cs2410 80 Cs3300 91 Cs2304 1 (19.49 KiB) Viewed 82 times
Example of 3 of the 30 student files:
Courses,Score
CS1410,92
CS2410,80
CS3300,91
CS2304,85
CS4311,96
CS4302,91
CS1311,81
Courses,Score
CS1410,98
CS2410,77
CS3300,85
CS2304,99
CS4311,99
CS4302,95
CS1311,96
Courses,Score
CS1410,82
CS2410,83
CS3300,91
CS2304,73
CS4311,95
CS4302,78
CS1311,80
Please Answer In R Programming Example Of 3 Of The 30 Student Files Courses Score Cs1410 92 Cs2410 80 Cs3300 91 Cs2304 2
Please Answer In R Programming Example Of 3 Of The 30 Student Files Courses Score Cs1410 92 Cs2410 80 Cs3300 91 Cs2304 2 (77.62 KiB) Viewed 82 times
Please Answer In R Programming Example Of 3 Of The 30 Student Files Courses Score Cs1410 92 Cs2410 80 Cs3300 91 Cs2304 3
Please Answer In R Programming Example Of 3 Of The 30 Student Files Courses Score Cs1410 92 Cs2410 80 Cs3300 91 Cs2304 3 (30.4 KiB) Viewed 82 times
Q3. You are given 30 student files inside the folder (Student.zip). Unzip the folder to extract the student files. Each file contains scores of students in 7 different courses (first column = course title, second column = total grade in the course). You can assume that no course is taken twice by a student. [35 points: 10+10+5+5+5)

• Use a for loop and read the files in the folder and store them in a single data frame where the first column is the course name, second column is the course score and the third column is the student name (simply use the file name without the "SV" extension as the student name). This data frame should have 210 rows. Add a fourth a column "lettergrade" to the data frame which indicates the letter grade of the student in that course using the following criteria on the course score: A: >=90, B: >=80 and <90, C: >=70 and < 80, D: >=60 and < 70, otherwise F For example, the first few rows of the data frame will look like this: course score studentname lettergrade 1 CS1410 92 studenti A 2 CS2410 80 student1 B 3 CS3300 91 studenti A 4 CS2304 85 student1 B 5 CS4311 96 student1 A 6 CS4302 91 studenti A 7 CS1311 81 studenti B 8 CS1410 84 student10 B 9 CS2410 91 student10 A 10 CS3300 91 student10 A Next, perform the following tasks Find the average score in each course. The resulting data frame is: course average 1 CS1311 85.1 2 CS1410 85.8 3 CS2304 84.2 4 CS2410 86.5 5 CS3300 85.4 6 CS4302 86.1 7 CS4311 88.4 • For each student, find the average score. First few rows of the data frame is given below: studentname average 1 studenti 88 2 student10 91.9 3 student11 85.6

4 student12 89.3 5 student13 83.6 6 student14 84.9 7 student15 88.1 8 student16 83.6 9 student 17 84.4 10 student18 88 • In each course, find out how many students received each of the letter grade. First Few rows of the resulting data frame are shown below: 2A lettergrade course numstudents 1A CS1311 9 CS1410 11 ЗА CS2304 11 4A CS2410 13 5A CS3300 12 6A CS4302 12 7A CS4311 17 8B CS1311 12 9B CS1410 14 10 B CS2304 #... with 11 more rows
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply