i
Exploring R
Evolution of R
Programming Features of R
R for Machine Learning
R for Data Analysis
Application of R
R vs. Python vs. SAS
R vs. Excel vs.Tableau
Install R base on Windows
Install R Studio on Windows
Install R base on Ubuntu
Install R Studio on Ubuntu
R Starter
First R Program
Working with R Packages
R Workplace and R Sessions
Manage working directory
Customize R studio
RStudio Debugger
RStudio History and Environment variables
R Syntax
R Variables
R Data Types & Structures
R Arithmetic Operators
R Logical Operators
R If Statement
R - If…Else Statement
If…else if…Else Statement
R for loop
R while loop
R repeat loop
R String Construction
R String Manipulation Functions
Creating Character Strings
R Functions
R built-in functions
Working with Vector
R Vector Indexing
R Vector Modification
R Arithmetic Vector Operations
R Lists
Access List elements (List Slicing)
List modification
R Matrix construction
Access Matrix elements
R Matrix Modification
R Matrix Operations
R Array Construction
Accessing Array Elements
Manipulating Array Elements
R Data Frames
Data Extraction
Data Frame Expansion
R Built-in Data frames
R Factors
Manage Factor levels
Factor Functions
R Contingency Tables
R Data Visualization
R – Charts and Graphs
R Density Plot
R Strip Charts
R Boxplots
R Violin Plots
R Bar Charts
R Pie Charts
R Area Plots
R Time Series
Graphics with ggplot2
Ggplot2 Structure
ggplot2 Bar Charts
ggplot2 Pie Chart
ggplot2 Area Plot
ggplot2 Histogram
ggplot2 Scatter Plot
ggplot2 Box Plot
Mean & Median
Standard Deviation
Normal Distribution
Correlation
T-Tests
Chi-Square Test
ANOVA Test
Survival Analysis
Data Pre-processing and Missing Value Analysis
Missing data treatment
Missing value analysis with mice package
Outlier Analysis
Problems with outliers
Outlier Detection
Outlier Treatment
Simple Linear Regression
Mathematical Computation
Linear Regression in R
A complete Simple Regression Analysis
Multiple Linear Regression
Mathematical Analysis
Model Interpretation
A complete Multiple Regression Analysis
Logistic Regression
Mathematical Computation in R
Logistic Regression in R
Heart Risk Analysis using LR
Support Vector Machine
Heart Risk Analysis using SVM
Decision Trees
Random Forest
K means Clustering
Big data Analytics using R-Hadoop
RHADOOP Packages:
rJava: Low-Level R to Java Interface
rhdfs: Integrate R with HDFS
rmr2: MapReduce job in R
plyrmr: Data Manipulation with MapReduce job
rhbase: Integrate HBase with R
Environment setup for RHADOOP
Getting Started with RHADOOP
Loop Operation
Loops are one of the most basic and powerful programming concepts. A loop is an instruction that repeats until a specified condition is reached. In a loop structure, it asks a question. If the answer requires action, it is executed. It may continue until no further action is required. In R programming, the environment we use for, while, and repeat for loop operation. Now we will follow them one by one.
In every section, we will start with basic syntax, then learn the flow diagram and finally finish with an example.
for loop
Let's begin with for loop. A for loop is useful when iterating over a list of elements or a range of numbers. This loop can be used to iterate over a vector, matrix, list, data frame, or any other object.
Flow Diagram:
Initially, for loop takes a sequence expression. In each iteration, this will be evaluated statement. This flow diagram will tell the same graphically.
A code may contain some initial expression, and then it checks the condition or test expression. If this is true, it will go to the main for loop body, then return to test expression. It will continue until the test result is true. In case of FALSE, it will exit the loop.
Syntax:
Example:
In this example, we will print the addition of a series of 1 to 100.
First, we initialize 0 to sum.
This for loop will start from 1, and the exit criteria is i= 100. In the first iteration sum=0, i=1, after the addition, the sum will be updated to 1. The second iteration, sum 1, i=2, the sum will store 3. In the next iteration, sum 3, i=3, the sum will be updated with 6. It will continue until i is 100.
Don't miss out!