CMSHSE101M/CMSGSE101M: (Credits:3):
📘 R LANGUAGE TUTORIAL AND NOTES MODULE WISE FOR STUDENTS
🚀 CLICK HERER Programming (45 Classes)
Module 1: Introduction to R Programming CLICK FOR NOTES 6 Classes
1. Introduction to R
● Overview of R and its uses in data analysis and statistics.
● Installing R and RStudio.
● Introduction to RStudio interface and its components (Console, Source, Environment, Plots,
etc.).
● Understanding the R command prompt.
● Basic operations: arithmetic operations, logical operations, and comparison operators.
● Data types in R: numeric, integer, character, logical, and factor.
● Variable assignment and naming conventions.
2. Data Structures in R
● Vectors: creation, indexing, and basic functions (length, class, typeof, etc.).
● Lists: creation, indexing, and subsetting.
● Matrices: creation, indexing, and operations.
● Data frames: creation, importing/exporting data, indexing, and subsetting.
● Factors: creation, levels, and usage in categorical data.
Module 2: Data Manipulation and Managemen CLICK FOR NOTES 10 Classes
1. Data Import and Export
● Reading data from CSV, Excel.
● Writing data to CSV, Excel.
2. Data Cleaning and Preparation
○ Handling missing values and duplicates.
○ Data type conversions.
○ Renaming columns and rows
3. Data Transformation
○ Selecting columns (select), filtering rows (filter), arranging data (arrange).
○ Mutating and transforming data (mutate, transmute).
○ Summarizing data (summarize, group_by).
Module 3: Data Visualization 10 Classes
1. Introduction to Data Visualization in R
○ Understanding the basics of data visualization.
○ Using base R graphics for plotting.
2. Using ggplot2 for Advanced Visualization
○ Introduction to the grammar of graphics.
○ Creating basic plots (scatter plots, line plots, bar plots, histograms).
○ Customizing plots (titles, labels, themes, colors, and scales).
○ Faceting and multi-plot layouts.
3. Interactive Visualizations
○ Introduction to interactive plots using plotly and shiny.
○ Creating basic interactive plots and dashboards.
Module 4: Statistical Analysis and Modeling 3 Classes
● Descriptive Statistics
○ Calculating measures of central tendency (mean, median, mode).
○ Calculating measures of dispersion (range, variance, standard deviation).
Module 5: Advanced R Programming 10 Classes
1. Control Structures
○ Conditional statements (if, else, switch).
○ Looping constructs (for, while, repeat).
○ Vectorized operations and the apply family of functions (apply, lapply, sapply,
tapply, mapply).
2. Debugging and Error Handling
○ Debugging tools in R (debug, trace, browser).
○ Handling errors and warnings (try, tryCatch).
Simple Programs : 6 Classes
1. Write a R program to take input from the user (name and age) and display the values. Also print
the version of R installation.
2. Write a R program to create a sequence of numbers from 20 to 50 and find the mean of numbers
from 20 to 60 and sum of numbers from 51 to 91.
3. Write a R program to multiply two vectors of integers type and length 3.
4. Write a R program to find Sum, Mean and Product of a Vector, ignore elements like NA or
NaN.
5. Write a R program to list containing a vector, a matrix and a list and give names to the elements
in the list.
6. Write an R program to extract 3
rd and 5
th
rows with 1
st and 3
rd columns from a given data frame.
7. Write a R program to sort a given data frame by multiple column(s).
8. Write a R program to compare two data frames to find the row(s) in the first data frame that are
not present in the second data frame.
9. Write a program to read a csv file and find min, max and range the data in the file in R
10. Write a program to find Mean, Median and Mode
Text Books:
1.William N. Venables and David M. Smith, An Introduction to R. 2nd Edition. Network Theory
Limited.2009
2. Norman Matloff, The Art of R Programming - A Tour of Statistical Software Design, No Starch
Press.2011 i
Reference Books:
1.The Book of R,Tilman M. Davies,No Starch Press,1st edition
2.Discovering Statistics Using R,Andy Field,SAGE Publications Ltd,1st edition
No comments:
Post a Comment