In R programming, a Matrix is an object with elements arranged as a two-dimensional array like a table. An R matrix can contain elements of only the same atomic types. In data analytics or data processing, we mostly use Matrix with the numeric datatype. In this tutorial, we will deal withContinue Reading

R Vector is a fixed length collection of similar type of elements. A vector in R programming is one-dimensional. A vector in R language can be compared to a one-dimensional array in other programming languages like C, Java, etc. An R Vector can contain elements belonging to one of these types: logical,Continue Reading

The functions which are already created or defined in the programming framework are known as a built-in function. R has a rich set of functions that can be used to perform almost every task for the user. These built-in functions are divided into the following categories based on their functionality.Continue Reading

The R Programming language introduced a new technique called Recursion for elegant and straightforward coding. Recursive functions in R means a function calling itself. To understand the R recursive functions programming, let us consider a well know, yet simple example called factorial. We can calculate the factorial of any givenContinue Reading

Functions in R Programming Functions in R Programming is a block of code or some logic wrapped inside the curly braces { }, which performs a specific operation. In this R Programming tutorial journey, We have already seen some functions, and you may not notice them. For instance, print, abs,Continue Reading

A loop statement allows us to execute a statement or group of statements multiple times and the following is the general form of a loop statement in most of the programming languages − R For Loop The R For Loop is used to repeat a block of statements until thereContinue Reading

R Switch syntax The basic syntax of the Switch in R Programming language is switch (Expression, “Option 1”, “Option 2”, “Option 3”, ….., “Option N”) Bit complicated syntactical approach of the Switch statement in r is: switch (Expression, “Option 1” = Execute these statements when the expression result match Option 1, “OptionContinue Reading

In the real programming world, the R If Statement is the primary decision-making statement. R If Statement tests the condition first, and depending upon the result, executes the statements. If the test condition is true, then only statements within the if block executed. R If Statement Syntax The syntax ofContinue Reading

A variable is a memory allocated for storage of specific data and the name associated with the variable is used to work around this reserved block. The name given to a variable is known as its variable name. Usually a single variable stores only the data belonging to a certainContinue Reading

Data Types Unlike SAS and SPSS, R has several different data types (structures) including vectors, factors, data frames, matrices, arrays, and lists. The data frame is most like a dataset in SAS. 1. Vectors A vector is an object that contains a set of values called its elements. Numeric vectorContinue Reading