### R Programming – A Practical Approach

#### Lessons

## R- Basics

In this Chapter, we have started with step-by-step Installation of R and the R Studio which is a GUI based IDE for R language. We have also explained package installation on R, built in datasets in R, manual data entry, data importing, tabular to row data conversion. We have also looked at the default colors present in the data and a more elaborate color options named "Colorbrewer". ## Steps to Install 'R'

In this lesson, you'll learn some of the steps to install R in your system. ## R-Studio Installation

In this lesson, you'll learn to install R Studio, which is a GUI based Integrated Development Environment (IDE). ## Using R Materials

In this lesson, you'll learn to download R materials and then use these R Materials in R Studio. ## R-Studio Interface

In this lesson, you will learn about the different interfaces of the R Studio such as R Script, Console Section, R Environment and Graphical Output Section. ## Steps to Install Packages

In this lesson, you will learn about various packages that are available in R and how to use them. ## Default Data-Sets in R

In this lesson, you will learn about the default datasets which are already installed in R. These are those packages which are by default installed and loaded in R. ## Manual Data Entry

R Programming provides different ways to enter the data manually. In this lesson, you'll learn about manual data entry in R. ## Data Importing

In R, there are different cases in which the data is required to be imported in order to use it. In this lesson, you'll learn to import the data. ## Tabular to Row Data Conversion

In R, the data has to be stored in a specific format so that it can be easily understood and used. In this lesson, you'll learn to arrange the data in rows and columns. ## R - Colors

We use R color for R data manipulation, with the help of R Color, our graphical output looks a lot better. In this lesson, you'll learn about R Color. ## Overview - 'Colorbrewer'

In this lesson, you will learn about an external package named RColorbrewer. By installing this package we can use R color brewer. ## Colors in R: Summary

In this lesson, we will summarize what we have learned so far in R Color, and will discuss about other applications of R Color.

## Introduction to Charts

This chapter covers the details about various charts in R. R programming has multiple libraries which can be used to create charts like Bar charts, pie charts, histograms, box-plots etc. A bar graph or a bar chart is the representation of data in bars. On other hand, a pie chart is the representation of data or values as sectors within the circle each represented with a different color to distinguish them. Box-plot is used for getting information about possible outliers in the data sample. Various ways to save plots as images has also been explained in the unit. ## Bar Charts

R language is mostly famous for graphical representation. A Bar Chart is a very good example of this. In this lesson, you'll learn about the Bar Charts. ## Pie Charts

In this lesson, you will learn about Pie Charts for graphical representation. A Pie Chart is also a very good source of data representation. ## Histograms

The histogram is suitable for visualizing distribution of numerical data over a continuous interval, or a certain time period. In this lesson, you'll learn about Histograms. ## Box-Plots

When there is a requirement of possible outliers while analyzing the data, then Box plots are used. In this lesson, you'll learn about Box plots. ## Customized Graphs

In this lesson, you will learn to customize the graphs and also see the effect of customization on your graph. ## Images

In this lesson, you'll learn to present the data in the image format. In order to do that, you'll first import the data in the image form and then present the data through the image. ## Layering Plots: Summary

In this lesson, you'll get the summary for the plotted datasets by using the Layered Plots.

## Introduction to Statistics

This chapter covers the basic concept of statistics viz frequencies, descriptive, hypothesis testing and chi-square testing in R programming. The frequency distribution of a data variable is the count of data that is occurring within a collection of non-repeated categories. Descriptive statistics gives summary statistics of the data and is the basis of advanced analysis of data. We then had a look on inferential statistics methods. In this unit, we have explained single proportion testing, single mean testing and Chi-square testing, which is used to infer results based on the sample data characteristics and hypothesized values. We have also done a univariate analysis to find patterns in the data. ## Frequencies

In this lesson, you'll now learn to calculate the frequency of data and analyze the data after changing it from frequency to density. ## Descriptives

In this lesson, you'll now learn about the descriptive statistics. These are those figures which are used for summarizing the data. ## Single Proportion Testing

In this lesson, you'll learn something about inferential statistics, for which you'll now be making use of the single proportion testing. ## Single Mean Testing

In this lesson, you'll learn about single mean testing. Single mean testing performs mean test for a sample in comparison to an aim value. ## Chi-Square Test

In this lesson, you'll learn about the Chi-Square test. This is the test which is used to determine the goodness for fit for the categorical variable. ## Univariate Analysis

In this lesson, you'll learn about Univariate Analysis Data, which is used to present the sample of a variable in a amazing way. ## Descriptive Statistics: Summary

In this lesson, you'll get the summary about Descriptive Statistics through a dataset.

## Manipulating Data

This chapter covers the details of working with data. We can have outliers in the data and its treatment is explained. Outliers are those observations which occur very infrequently and might be the result of errors while observing. Proper treatment of data is necessary for the unbiased result.This might includes subsetting, sorting, extracting unique observations renaming variables, creating new variables etc. Each of these tasks can be accomplished using set of newly introduced packages. ## Outliers

In this lesson, you'll learn to treat the present outliers in the data. In order to do this, you'll use a categorical data to understand the outliers. ## Transformation of Variables

In this lesson, you'll learn to transform the variable to fit better in the assumption of data analysis. ## Composite Variables

In this lesson, you'll demonstrate the functionality of the composite variable using the random variable. ## Working with Missing Data

In this lesson, you'll learn to deal with the missing data which are also seen often in your data. You need to treat them in such a way that your figures are not biased. ## Working with Outliers: Summary

In this lesson, you'll get the complete summary of whatever you have learned so far in outliers.

## Managing Huge Data

In this chapter, we have worked with cases, subgroups and files. Any data set is like an enclosed or shelled collection. It consists of cases which are exactly the objects in the same collection with each case having one or more attributes or qualities known as variables. This lesson covers working with subgroups, and merging files. Merging means that different datasets or files are combined together within a single dataset or file. R programming includes method to merge the files. ## Working with Cases

In this lesson, you'll learn the method of customizing your analysis for a particular parameter in a set of data. ## Working with Subgroups

In this lesson, you'll look at the demonstration of by which you can obtain all the descriptive calculations of all the values __of a particular variable at a time. ## Working with Files - Merging

In this lesson, you'll learn about a very useful method of combining the different data in a same unit. This method is called as Merging. ## Working with Subgroups: Summary

In this lesson, you get a complete summary of all the analysis of this section with subgrouping.

## Association: Presentation

In this chapter, the Bar charts, Box plots and scatter plots have been demonstrated. A bar chart or a bar graph represents the the data with the help of bars or rectangles. The values of the variables are determined by the height or length of the rectangle be it vertical or horizontal. A box plot is an exploratory graphic which enables us to encapsulate the features of quantitative variables. A scatter plot pairs up the values of two quantitative variables in a dataset and represent them as geometric points in the Cartesian diagram. ## Bar Charts

In this lesson you'll learn about the different ways to analyze your data with the help of Bar charts. ## Box Plots

In this lesson, you'll make use of the iris dataset to summarize and present data with the help of Box Plots. ## Scatter Plots

In this lesson, you'll explore the quantitative relation between the variables with the help of a scatter plot using the iris dataset and the swiss dataset. ## Working with Plots: Summary

In this chapter we will summarize all the information about the appropriate section.

## Associations: Statistics

In this chapter, the statistical concepts like correlation, regression, proportions etc have been covered in detail. A correlation is a statistical method or technique to display if there is a relation between pairs of variables or how strongly the pairs of variables are related. Regression is the most critical fundamental tool for statistical analysis frequently used in various research fields. Bivariate regression is the simplest linear regression procedure. Then we also demonstrated few tests as well in the later part of the chapter such as T test, one-factor analysis of variance, proportions etc. ## Correlation

In this lesson, you'll learn about the correlation. In mathematical terms, Correlation is equivalent to the covariance of the two variables divided by the product of the standard deviation of each data sample. ## Bivariate Regression

In this lesson, you'll explore Bivariate Regression with the help of appropriate line regression and vector equations. ## T-Test

In this lesson, you'll learn about T-Statistics by comparing the calculated values of two samples with the T-test using the Iris Dataset. ## Paired T-Test

In this lesson, you'll learn to examine the difference between two samples by creating two Random Variables, through Paired T-test. ## ANOVA

In this lesson, you'll learn to test the similarities of the content from two populations or groups with ANOVA test. ## Proportions

In this lesson, you'll learn to compare the categorical groups with the help of proportion. ## Chi-Square Test

In this lesson, you'll learn to make use of the Chi-Square test to perform independent testing between the two specific variables. ## Statistics for Bivariate Associations

In this lesson, you'll learn about the statistics of Bivariate Associations using some packages available in R. ## Association Stats: Summary

In this lesson, you'll get the summary of all the testing and other statistics of the appropriate section which you have used in this section.

## Advanced Charts

In this chapter, the method of creating bar charts for mean, scatter plots for grouped data, scatter plot matrices and a very interesting and visual 3D scatter plot have been covered in detail.. ## Bar Charts for Mean

In this lesson, you'll learn about drawing the bar charts for multiple variables defined by different categories. ## Scatter Plots for Grouped Data

In this lesson, you'll learn to plot a Scatter Plot for multiple variables by loading the CSV file in R. ## Scatter Plot Matrices

In this lesson, you'll learn to plot a Scatter Plot by loading the matrix data. ## 3D Scatter Plots

In this lesson, you'll learn to plot a grouped data with the help of 3D Scatter Plot. ## Charts for Multiple Variables: Summary

In this lesson, you'll get the complete summary of various plotting techniques and Bar Charts.

## Multiple Variable Statistics

In this chapter, some relatively advanced topics such as multiple regression, two factor ANOVA, cluster analysis and principal component & factor analysis have been covered in detail. These topics are very important specially multiple regression which is used very extensively in research papers and industry to establish relationship between variables. ## Multiple Regression

In this lesson, you'll learn about Multiple Variable Statistics, which is the most common tool of Multiple Regression with the help of an inbuilt database. This tool is used to analyze the data. ## Two-Factor ANOVA

In this lesson, you'll learn to analyze two-factor ANOVA with the help of toothgrowth, through which you'll learn to interact between two-categorical terms. ## Cluster Analysis

In this lesson, you'll learn about cluster analysis which creates clusters or groups based on the values __of variables. ## Principal Component / Factor Analysis

In this lesson, you'll learn to search the components using Principal component analysis which will explain the most viewed variations in the data. ## Multiple Variable Statistics: Summary

In this lesson, the course will be concluded with the summary of whatever has been covered in this section so far.