Publications by sabir

R Pie Chart

18.07.2022

A pie chart is a circular statistical graphic, which is divided into slices to illustrate numerical proportion. Pie charts represents data visually as a fractional part of a whole, which can be an effective communication tool. Create Pie Plot in R In R, we use the pie() function to create a pie chart. For example, expenditure <- c(600, 300, 150,...

2243 sym R (1303 sym/8 pcs)

R Boxplot

18.07.2022

A boxplot is a graph that gives us a good indication of how the values in the data are spread out. Box plots provide some indication of the data's symmetry and skew-ness. Dataset to Create Boxplot In R, first we need to load the dataset of which we want to create the boxplot of. In this tutorial, we will be using the built-in dataset named mtcar...

2746 sym R (654 sym/6 pcs)

R strip Chart

18.07.2022

A strip chart is a type of chart that displays numerical data along a single strip. A strip chart can be used to visualize dozens of time series at once. Dataset to Create Strip Chart In R, first we need to load the dataset of which we want to create the strip chart of. In this tutorial, we will be using the built-in dataset named airquality ...

2738 sym R (891 sym/6 pcs)

R Read and Write CSV Files

18.07.2022

The CSV (Comma Separated Value) file is a plain text file that uses a comma to separate values. R has a built-in functionality that makes it easy to read and write a CSV file. Sample CSV File To demonstrate how we read CSV files in R, let's suppose we have a CSV file named airtravel.csv with following data: Month, 1958, 1959, 1960 JAN, 3...

3526 sym R (2269 sym/14 pcs)

R Read and Write xlsx Files

18.07.2022

An xlsx is a file format used for Microsoft Excel spreadsheets. Excel can be used to store tabular data. R has built-in functionality that makes it easy to read and write an xlsx file. Sample xlsx File To demonstrate how we read xlsx files in R, let's suppose we have an excel file named studentinfo.xlsx with the following data: We will be readin...

3806 sym R (2929 sym/13 pcs)

R Matrix

18.07.2022

A matrix is a two-dimensional data structure where data are arranged into rows and columns. For example, {IMAGE: 2 * 3 matrix with integer data} Here, the above matrix is 2 * 3 (pronounced “two by three”) matrix because it has 2 rows and 3 columns. Create a Matrix in R In R, we use the matrix() function to create a matrix. The syntax of the ...

3744 sym R (2366 sym/21 pcs)

R break and next

19.07.2022

We use the R break and next statements to alter the flow of a program. These are also known as jump statements in programming: break – terminate a looping statement next – skips an iteration of the loop R break Statement You can use a break statement inside a loop (for, while, repeat) to terminate the execution of the loop. This will stop a...

2378 sym R (789 sym/8 pcs)

R repeat Loop

19.07.2022

We use the R repeat loop to execute a code block multiple times. However, the repeat loop doesn't have any condition to terminate the lYou can use the repeat loop in R to execute a block of code multiple times. However, the repeat loop does not have any condition to terminate the loop. You need to put an exit condition implicitly with a break sta...

1862 sym R (766 sym/7 pcs)

R Functions

19.07.2022

Introduction to R Functions A function is just a block of code that you can call and run from any part of your program. They are used to break our code in simple parts and avoid repeatable codes. You can pass data into functions with the help of parameters and return some other data as a result. You can use the function() reserve keyword to creat...

3869 sym R (1678 sym/16 pcs)

R Color

20.07.2022

We can visually improve our plots by coloring them. This is generally done with the col graphical parameter. We can specify the name of the color we want as a string. For example, if we want our plot to be a red color, we pass col = "red". Add Color to Plot in R We use the following temp vector to create a barplot throughout this section. # crea...

3567 sym R (1798 sym/9 pcs)