Building Your First Data Analysis Project
Creating a Student Performance Dataset
In this project, you will build a small table of ten students and add total marks, average marks, and a grade.
We use only base R, so you need no extra packages. Ten students are enough to see every step clearly. Start by creating one vector for each column, then join them into a data frame. Save the code as 01_beginner_project.R.

Calculating Basic Statistics and Summaries
Now calculate the total, the average, and a grade for each student. Then use summary(), mean(), median(), and standard deviation to understand the marks.
Find the top student and measure how closely attendance and marks move together.

Running and Verifying the First Analysis
Run the whole script. A good analyst always checks the result, so end the script with a test that confirms there are ten rows and that every total is correct. If the test fails, R stops and shows an error.
The main results from the real run are shown here:
- Five of the ten students earned a B, three earned an A, and two earned a C.
- Vijay has the highest average at 92.33.
- The correlation of 0.988 is very high only because this small table was made neat on purpose.
Real data is never this clean, and the next level uses a messier file.


Try it yourself: Add a fourth subject and change the grade limits.
Level Summary
You now know what R is, how it works, and how to set it up. You can:
- Store data in variables.
- Work with vectors and data frames.
- Write functions.
- Read and save files.
- Complete an analysis from start to end.
Next, you will learn to clean real data and draw charts.
R for Data Science
Harini A








