This repository contains R scripts covering fundamental to advanced topics in R programming. The focus is on data manipulation, statistical calculations, and data visualization, which are essential for data science and analytics.
- Basic Operations & Assignment – Print statements, assignments, and operations in R
- Control Structures – If-else, loops (for, while), and conditional execution
- User-Defined Functions – Writing custom functions for reusable code
- Vectors & Named Vectors – Creation, sorting, and modification
- Matrices – Creation, indexing, matrix operations (solve, determinant, eigenvalues)
- Arrays – 3D array creation and access
- Lists – Creation, indexing, and operations
- Data Frames – Creation, accessing, conditional selection, column-row operations
- Reading & Writing CSV Files – Handling CSVs, row names, skipping rows, setting working directories
- Reading & Writing Excel Files – Read/write
.xlsxfiles usingwritexl,readxl - Working with RData Files – Saving and loading
.RDatafiles
- dplyr Package – Filtering, arranging, summarizing, renaming, pipe operators (
%>%) - Conditional Selection & Subsetting – Extracting specific data subsets
- Apply Family Functions –
apply(),sapply(),lapply(),tapply()for data transformation - Table & Summary Functions – Summarizing categorical and numerical data
- Package Management – Installing and using R packages
- Vectorized Operations – Arithmetic, logical, and comparison operators
- Data Visualization – Plotting and Updating Various graphs from Datasets
To run any script, open RStudio or use the R terminal and execute:
source("filename.R")Ensure you have R and RStudio installed. Some scripts require additional packages like dplyr, readxl, and writexl, which can be installed using:
This repository is designed to help students, data enthusiasts, and professionals learn and practice R programming concepts. The scripts cover:
- Fundamental operations and data structures
- Reading and writing different file formats (CSV, Excel, RData)
- Data manipulation using
dplyrand base R - Statistical calculations and apply family functions
- Control structures and user-defined functions
Whether you're a beginner or looking to strengthen your R skills, this repository serves as a structured learning resource.
This repository is open-source and available for learning purposes. Feel free to explore, modify, and enhance the scripts!
Happy Coding! 🚀