R Tutorial Last Updated : 18 Jan, 2023 Improve Improve Like Article Like Save Share Report R is an open-source programming language mostly used for statistical computing and data analysis and is available across widely used platforms like Windows, Linux, and MacOS. It generally comes with the command-line interface and provides a vast list of packages for performing tasks. R is an interpreted language that supports both procedural programming and object-oriented programming. R Programming Tutorial, designed to provide both beginners and experts with the knowledge and skills needed to effectively analyze and visualize data using R. R tutorial covers all the basic and advanced concepts of R, including introduction, features, installation, variables, data types, operators, if statement, vectors, data handling, graphics, and statistical modeling. Recent Articles on R! Basics, Fundamentals of R, Variables, Input and Output, Decision Making, Control Flow, Functions, Data Structures, Strings, Vectors, Lists, Arrays, Matrices, Factors, DataFrames, Object Oriented Programming, Error Handling, File Handling, Packages in R, Data Interfaces, Data Visualization, Statistics, Machine Learning with R Basics Introduction to R Programming Language Interesting Facts about R Programming Language R vs Python Environments in R Programming Introduction to R Studio How to Install R Studio on Windows and Linux? Creation and Execution of R File in R Studio Clear the Console and the Environment in R Studio Hello World in R Programming Fundamentals of R Basic Syntax Comments Operators Keywords Data Types Variables Introduction to Variables Scope of Variable Dynamic Scoping Lexical Scoping Lexical Scoping vs Dynamic Scoping Input and Output Taking Input from User Printing Output of R Program Print the Argument to the Screen – print() Function Decision Making Decision Making – if, if-else, if-else-if ladder, nested if-else, and switch if statement if-else statement Switch case Control Flow Introduction to Control Statements Loops (for, while, repeat) For loop while loop Repeat loop goto statement Break and Next statements Next Statement Functions Introduction to Functions Function Arguments Types of Functions Recursive Functions Conversion Functions Data Structures Introduction to Data Structures Strings Introduction to Strings Working with Text String Manipulation Concatenate Two Strings String Matching How to find a SubString? Finding the length of string – nchar() method Adding elements in a vector – append() method Convert string from Lowercase to Uppercase – toupper() function Convert String from Uppercase to Lowercase – tolower() method Splitting Strings – strsplit() method Print a Formatted string – sprintf() Function >>> More Functions on Strings Vectors Introduction to Vectors Operations on Vectors Append Operation on Vectors Dot Product of Vectors Types of Vectors Assigning Vectors Getting and Setting Length of the Vectors – length() Function Creating a Vector of sequenced elements – seq() Function Get the Minimum and Maximum element of a Vector – range() Function Formatting Numbers and Strings – format() Function Replace the Elements of a Vector – replace() Function Sorting of a Vector – sort() Function Convert elements of a Vector to Strings – toString() Function Extracting Substrings from a Character Vector – substring() Function >>> More Functions on Vectors Lists Introduction to Lists Two Dimensional List Operations on Lists List of Vectors List of Dataframes Named List Check if the Object is a List – is.list() Function Convert an Object to List – as.list() Function Check if an Object of the Specified Name is Defined or not – exists() Function Apply a Function over a List of elements – lapply() Function Performing Operations on Multiple Lists simultaneously – mapply() Function >>> More Functions on Lists Arrays Introduction to Arrays Multidimensional Array Array Operations Sorting of Arrays Convert values of an Object to Logical Vector – as.logical() Function Performing different Operations on Two Arrays – outer() Function Intersection of Two Objects – intersect() Function Get Exclusive Elements between Two Objects – setdiff() Function >>> More Functions on Arrays Matrices Introduction to Matrices Create Matrix from Vectors Operations on Matrices Matrix Multiplication Algebraic Operations on a Matrix Combining Matrices Matrix Transpose Inverse of Matrix Working with Sparse Matrices Check if the Object is a Matrix – is.matrix() Function Convert an Object into a Matrix – as.matrix() Function Get or Set Dimensions of a Matrix – dim() Function Calculate Cumulative Sum of a Numeric Object – cumsum() Function Compute the Sum of Rows of a Matrix or Array – rowSums Function >>> More Functions on Matrices Factors Introduction to Factors Level Ordering of Factors Convert Factor to Numeric and Numeric to Factor Check if a Factor is an Ordered Factor – is.ordered() Function Convert an Unordered Factor to an Ordered Factor – as.ordered() Function Checking if the Object is a Factor – is.factor() Function Convert a Vector into Factor – as.factor() Function >>> More Functions on Factors DataFrames Introduction to Data Frames Matrix vs Dataframe DataFrame Operations DataFrame Manipulation Joining of Dataframes The Factor Issue in a DataFrame Data Reshaping Creating a Data Frame from Vectors Data Wrangling – Data Transformation Data Wrangling – Working with Tibbles Melting and Casting Subsetting of DataFrames Handling Missing Values Convert an Object to Data Frame – as.data.frame() Function Get the number of columns of an Object – ncol() Function Get the number of rows of an Object – nrow() Function Get Addition of the Objects passed as Arguments – sum() Function Create Subsets of a Data frame – subset() Function >>> More Functions on DataFrames Object Oriented Programming Introduction to Object-Oriented Programming Classes Objects Encapsulation Polymorphism Inheritance Abstraction Looping over Objects Creating, Listing, and Deleting Objects in Memory S3 class Explicit Coercion R6 Classes Getting attributes of Objects – attributes() and attr() Function Get or Set names of Elements of an Object – names() Function Get the Minimum element of an Object – min() Function Get the Maximum element of an Object – max() Function >>> More Functions on R Objects Error Handling Introduction to Error Handling Condition Handling Debugging in R Programming File Handling Introduction to File Handling Reading Files Writing to Files Read Lines from a File – readLines() Function Working with Binary Files Packages in R Introduction to Packages dplyr Package ggplot2 package Grid and Lattice Packages Shiny Package tidyr Package What Are the Tidyverse Packages? Data Munging Data Interfaces Data Handling Importing Data in R Script How To Import Data from a File? Exporting Data from scripts Working with CSV files Working with XML Files Working with Excel Files Working with JSON Files Reading Tabular Data from files Working with Databases Database Connectivity Manipulate Data Frames Using SQL Data Visualization Graph Plotting Graphical Models Plotting Graphs using Two Dimensional List Data Visualization Charts and Graphs Add Titles to a Graph Adding Colors to Charts Adding Text to Plots Adding axis to a Plot Set or View the Graphics Palette Plotting of Data using Generic plots Bar Charts Line Graphs Adding Straight Lines to a Plot Addition of Lines to a Plot Histograms Pie Charts Scatter plots Create One Dimensional Scatterplots Create a Plot Matrix of Scatterplots Create Dot Charts Boxplots in R Language Stratified Boxplot Create a Heatmap Pareto Chart Waffle Chart Draw a Quantile-Quantile Plot Creating 3D Plots Describe Parts of a Chart in Graphical Form Principal Component Analysis Social Network Analysis Statistics Introduction to Statistics Calculate the Mean, Median, and Mode Calculate the Average, Variance, and Standard Deviation Homogeneity of Variance Test Covariance and Correlation Correlation Matrix Visualize correlation matrix using correlogram Distance Matrix by GPU Descriptive Analysis Normal Distribution Binomial Distribution Compute the Negative Binomial Density Poisson Functions ANOVA Test MANOVA Test Naive Bayes Classifier K-NN Classifier Central Tendency Variability Skewness and Kurtosis Absolute and Relative Frequency Permutation Hypothesis Test AB Testing Completely Randomized Design Randomized Block Design Bartlett’s Test Tree Entropy Tukey’s Five-number Summary Compute Summary Statistics of Subsets Hypothesis Testing Bootstrapping Time Series Analysis T-Test Approach Machine Learning with R Introduction to Machine Learning Setting up Environment for Machine Learning Supervised and Unsupervised Learning Classification Regression and its Types Regression Analysis Decision Tree Random Forest Approach Root-Mean-Square Error Clustering Hierarchical Clustering DBScan Clustering Deep Learning Building a Simple Neural Network How Neural Networks are used for Regression? Multi Layered Neural Networks Survival Analysis Stem and Leaf Plots My Personal Notes arrow_drop_up Save Like Article Suggest improvement Next R Programming Language - Introduction Share your thoughts in the comments Add Your Comment Please Login to comment...