R: Linear Regression – Predicting Future Data

This article shows how we can predict future data with Linear Regression using R programming language. Regression Analysis builds a relationship model between two variables. The general mathematical equation for linear regression is: y = ax + b where, y = response variable (value we need to find out using predictor variable) x = predictor … Read more

R: Correlation – Finding out relation between data

This article shows how to calculate correlation between two data/variables using R programming language. Correlation calculates the relation between two variables. Positive Correlation: If the value of one variable increases with the increase in value of the another variable then the two variables are said to be positively correlated. Negative Correlation: If the value of … Read more

R: Calculate Mean, Median, Mode, Variance, Standard Deviation

This article shows how to calculate Mean, Median, Mode, Variance, and Standard Deviation of any data set using R programming language. Mean: Calculate sum of all the values and divide it with the total number of values in the data set. > x <- c(1,2,3,4,5,1,2,3,1,2,4,5,2,3,1,1,2,3,5,6) # our data set > mean.result = mean(x) # calculate … Read more

R: Data Visualization – Creating Pie Chart, Bar Chart & Line Graph

This article shows how to create Pie chart, Bar chart & Line graph using R Programming Language. Set Working Directory Set a directory where you want to save the image of pie chart, bar chart & line graph. > print (getwd()) # get current working directory [1] "/home/mukesh" > setwd('/home/mukesh/Documents/training') # set working directory > … Read more

R: Read Write CSV

This article shows how to read and write CSV file with R programming language. We will be manually creating a new CSV file with the following data: rollno,name,gender,age,marks,address 7,Ram,M,22,77,Kathmandu 9,Sita,F,23,88,Bhaktapur 14,Hari,M,24,74,Lalitpur 22,Radha,F,25,65,Bhaktapur 3,John,M,23,90,Kathmandu 11,Jia,F,21,55,Kathmandu We name the CSV file as students.csv. The CSV file contains data of students. It contains roll no, name, gender, age, … Read more

Basic Introduction to R Programming [Beginner Tutorial]

This article aims to introduce the very basics of R programming. This artilce includes R programming introduction, installation, basic syntax, running code, data types, relational operators and functions. 1. Introduction 1.1 What is it? – Programming Language Software – Used for Statistical Analysis & Graphical Representation – Freely available 1.2 What can it do? – … Read more