Techworld

Dataframes in R Language

A data frame is a table or a two-dimensional array-like structure in which each column contains values of one variable and each row contains one set of values from each column. Following are the characteristics of a data frame. The column names should be non-empty. The row names should be unique. The data stored in …

Dataframes in R Language Read More »

Subsetting in R:

Subsetting in R is a useful indexing feature for accessing object elements. It can be used to select and filter variables and observations. You can use brackets to select rows and columns from your dataframe. subset () function in R Language is used to create subsets of a Data frame. This can also be used …

Subsetting in R: Read More »

Visualization with Matplot ():

Matplot Function is useful for quickly plotting multiple sets of observations from the same object, particularly from a matrix, on the same graph. It Plots the columns of one matrix against the columns of another (which often is just a vector treated as 1-column matrix). Syntax: Matplot (x, y, type = “p”, lty = 1:5, …

Visualization with Matplot (): Read More »

Creating our First Matrix

If you are confused to use any Functions or operations in R , Just type question Mark and function name , You will get the documentation of the function in Help pane. Creating First matrix : Here we are creating our first Matrix : Variable my_data is created and iam trying to print 1 to …

Creating our First Matrix Read More »

Matrix in R Language

Matrix is a rectangular arrangement of numbers in rows and columns. In a matrix, as we know rows are the ones that run horizontally, and columns are the ones that run vertically. In R programming, matrices are two-dimensional, homogeneous data structures. These are some examples of matrices: To create a matrix in R you need to …

Matrix in R Language Read More »

Create Vector in R Language

As we discussed about Vectors in my Previous Post, if not referred please find the below link to explore. Vectors are the most basic R data objects and there are six types of atomic vectors. They are logical, integer, double, complex, character and raw. Lets Take some quick examples to Create Vector : Single Vector …

Create Vector in R Language Read More »

Switch Statement in R Language

A switch statement is a selection control mechanism that allows the value of an expression to change the control flow of program execution via map and search. The switch statement is used in place of long if statements which compare a variable with several integral values. It is a multi-way branch statement which provides an …

Switch Statement in R Language Read More »

Repeat Loop in R Programming:

A repeat loop is used to iterate over a block of code multiple number of times. There is no condition check in repeat loop to exit the loop. We must ourselves put a condition explicitly inside the body of the loop and use the break statement to exit the loop. Failing to do so will result into …

Repeat Loop in R Programming: Read More »

Operators in R Language :

An operator is a symbol that tells the compiler to perform specific Arithmetical  or logical manipulations. R language is rich in built-in operators and provides following types of operators. R’s binary and logical operators will look very familiar to programmers. Note that binary operators work on vectors and matrices as well as scalars. 1.Arithmetic Operators: 2. Logical Operators : Practicing exercises  on …

Operators in R Language : Read More »