Exercise 5: Data Frames
Explore how to build and manipulate data frames in R by creating a student semester record. Understand how to organize course names, grades, and lectures attended using data frames, and practice printing data frames correctly in R.
We'll cover the following...
We'll cover the following...
Problem Statement
Create a student’s semester record. This record should include the courses the student took, their grade, and the number of lectures that student attended for that particular course.
For reference look at the figure below:
A student semester record
Your task is to replicate this record using data frames.
Use
print()for printing the data frame; else the test cases will not pass.
Sample Output
Course LecturesTaken Grade
1 Maths 12 F
2 English 49 B
3 Science 52 A
Test Yourself
Write your code in the given area. If you get stuck, you can look at the solution.