How to make Boxplots in R

R Boxplots Boxplot is a measure of how well the data is distributed in a data set. It is used to give a summary of one or several numeric variables. The line that divides the box into two parts represents the median of the data. The end of the box shows the lower and...

How to create Histograms in R

R Histograms A Histogram is the graphical representation of the distribution of numeric data. It takes only one numeric variable as input. The variable is cut into several bars (also called bins), and the number of observation per bin is represented by the height of...

R Line Graphs

Line graph or line chart is a graph that connects a series of points by drawing segments between them. A line graph represents the relationship between 2 variables. These points are ordered in one of their coordinates (usually the x- coordinate) value. The plot()...

R Inheritance

One the main concept of object oriented programming is inheritance which allows us to define a new class of existing classes. This means that we can derive new classes from existing base classes and adding new features. Hence, inheritance provides re-usability of...

R Pie Charts

R programming language provides many numbers of libraries to create charts and graphs. A pie-chart is a representation of data as slices of a circle with different colors representing counts or proportions. Each slice is labeled and the numbers corresponding to each...

R Loops

Loops are used to repeat a certain set of actions so you don’t have to perform them repeatedly. Suppose you want to perform operation 10 times, if you start writing the code for each time, the program’s length increases and it would be difficult for you to understand...

R Switch Statement

It is an alternate way to a nested if…else statement. A switch statement permits an expression to be tested against a list of case values. In short, we can say that a switch statement is used to compare an expression to known values or number of cases. Syntax:...

R If Else Statement

If statement It is the most simple decision-making statement. It checks the condition if the condition is true then only it will execute the block of statements written in the ‘if statement’. Syntax: if (Boolean_Expression)  {       Statement 1;      Statement 2;     ...

R Bar Charts

Bar charts represent data in the form of rectangular bars. In R, we can create bar charts using barplot() function. We can supply a matrix or vector to this function.  R supports both vertical and horizontal bars in the bar chart. Syntax: barplot(H,xlab,ylab,main,...

R S3 Class

S3 class implements a style of OO (Object Oriented) programming called generic- function OO. This is totally different from most programming languages, like C++, Java, and C# which implement message passing OO. With message passing messages or methods are sent to...

Pin It on Pinterest