Loop Control Statements

Loop control statements are used to change the execution from its normal sequence. When execution leaves a scope all automatic objects are destroyed that were created in scope. Following are some loop control statements in R language: Break Loop Control Statements in R To immediately exit from the loop and to break the execution of … Read more

If Statement in R

If statement is used for decision making in R to help out to make a decision on the basis of condition. If statement in R is a conditional programming statement that displays the information if it is proved true. The if statement consists of the Boolean expressions followed by one or more statements. If statement … Read more

Operators in R

In programming, an operator is a sign which represents an action. The operator in R is a symbol that tells the compiler to perform specific logical or mathematical manipulations. R programming is vast in built-in operators. There are several types of operators in R, and every operator performs a different task. Here are some modern … Read more

R Comments

Comments are used for R code explanation.  R comments make the code more readable.  When testing alternate code we can also prevent execution using comments. In R programming comments starts with the # symbol. R language ignores everything that starts with the # symbol while executing the R code. Following are some examples to execute … Read more

Variables in R

For storing data values variables are used as containers. For declaring variables in R doesn’t have a command. For creating a variable, you have to assign a value to it. For assigning a value to a variable, we need to use the sign (<-). To print the variable value, only type the variable name: Output: … Read more

R Vector

The R vector is a list of items that are of the same type. The c() function is used to combine the list of items to a vector after separating the items by a comma. Below example shows a vector variable language, that combines strings: Output In this example, we create a vector that combines numerical … Read more

R Classification

The R classification algorithm is a very easy task. By analyzing the training dataset we can predict the target class. We can obtain better boundary conditions that can be used to check the target class using the training dataset. The whole process is known as classification.  R Classification algorithms Some important points of R classification … Read more

Histogram in R

The histogram in R is used to represent variable values frequency. The difference between histogram and barplot is that histogram groups the values into continuous ranges. To create a histogram in R we used the hist() function. The height of the bars represents the frequency of that variable. The histogram takes a vector as input … Read more

Boxplot in R

The boxplot in R is a very famous type of graph. Boxplot shows us how data is distributed in a dataset and divides the data into three quartiles. This graph is used to represent the first and third quartile, median, max, and min in a dataset. It also compares the distribution by making boxplots across … Read more

Binary File in R

we can read and write a binary file in R. A file that contains information present only in the form of bits and bytes (0 and 1) is called a binary file. A binary file is not readable by humans. The data generated by the other programs need to be processed by R as a … Read more