Introduction to R programming

R is a programming language that is used for statistical computing and graphics. R programming is similar to S programming. It is considered a different style of S language implementation. S language code runs unaltered under R language but there are also some differences. R programming provides statistical linear and non-linear modeling, time series forecasting, … 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 Installation

R language is a very famous programming language. To work on the R language we have to install R language in our system. For R installation, we need to install the following things: R RStudio For the R and RStudio installation process click here. R installation in Windows To create a project on R language, … Read more

C# String

String in C# is a sequence of Unicode characters or maybe it can be an array of characters. To represent String in C# we use a class named System. The string keyword is an alias for the System.String class. String in C# represents the array of characters (known as text). The string is a reference type. It can … 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

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

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

If-else statement in R

Another type of decision-making statement is an if-else statement. If-else statement in R is the if statement followed by an else statement. Else statement will be executed when the Boolean expression will false. In short, if a Boolean expression comes true, then the, if segment gets executed otherwise the else block, will get executed. Any … Read more

Else if statement in R

To test the different conditions this statement is used in single if….. Else if statement in R. This statement is followed by an optional else if…. Else. This is a conditional programming statement also known as a nested if-else statement. There are some points that are mandatory to understand when we are using the if…..else … Read more