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- …

Read moreR Line Graphs

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 …

Read moreR Inheritance

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 …

Read moreR Pie Charts

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 …

Read moreR Loops

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 …

Read moreR Switch Statement

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:

First of all, it will check …

Read moreR If Else Statement

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 …

Read moreR Bar Charts

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 …

Read moreR S3 Class

R S4 Class

S4 class is similar to S3 but is more formal and improvement over the S3 class. There are two major differences between S3 and S4. S4 has formal class definitions, which define the representation and inheritance for each class, and …

Read moreR S4 Class

R XML Files

XML stands for Extensible Markup Language. It is a file format which shares both file format and data on the WWW, intranets, and elsewhere using ASCII text. It is a popular choice for storing large amounts of complex data. It …

Read moreR XML Files

R Lists

R List is a collection of R-objects which contains elements of different types like – strings, numbers, vectors and another list inside it. A list can also contain function or a matrix as its elements. Creating a list In R, …

Read moreR Lists

R Vectors

Vector is a sequence of data elements of the same type. It is a one dimensional array. Members of a vector are known as components. There are five classes of vectors: Numeric Integer Complex Logical Character Creating a Vector Single …

Read moreR Vectors

R Packages

Building and installing an R package In R Programming, packages are a collection of functions, data sets and compiled code. Packages are used to collect sets of R functions into a single unit. The directory where packages are stored is …

Read moreR Packages

R JSON File

JSON stands for JavaScript Object Notation. It is a lightweight format for storing and transporting data. JSON file is often used when data is sent from a server to a web page. It often stores data as text in human …

Read moreR JSON File

R Factors

Factors are the R data objects. It is used to categorize the data and store it as levels. They can store both integers and strings. Factors are used in data analysis for statistical modeling. factor() function is used to create …

Read moreR Factors

R Excel Files

Microsoft Excel is the spreadsheet program which stores data in the .xls and .xlsx format. R has the facility to read directly from these files using some excel specific packages. Some excel packages are: XLConnect, xlsx, gdata, RODBC, RExcel, etc. …

Read moreR Excel Files

R Data Reshaping

In R programming, data reshaping is the process of changing the way data is organized into rows and columns. Most of the time data processing is done by taking the input data as a data frame. Sometimes we need data …

Read moreR Data Reshaping