map() Function in R: How to Install Purrr Package

R Map: How to Install Purrr Package and Use map() in R

If you are working with functions and vectors, then you need to use the purrr package. The purrr package improves the R’s functional programming (FP) toolkit. The map() function in R is categorized under functional programming that allows you to replace many for loops with code that is more concise and clearer to read. How to Install … Read more

apply() Function in R with Example

Apply in R - How to Use apply() Function in R Programming

The apply() in R is essentially allows us to cross the data in several ways to conceal the explicit uses of loop constructs. The apply() function can be utilized for an input matrix, array, or list. apply() in R The apply() is an inbuilt R function that returns a vector or an array or a … Read more

lapply() Function in R: How to Use lapply() Method

R lapply - How to Use lapply() Function in R Programming

The apply() function is bundled with the R package. The apply() function can be feed with many functions to perform repetitive operations on a collection of objects (data frame, list, vector, etc.). The apply() functions form the basis of more complex combinations and helps to perform operations with very few lines of code. More specifically, … Read more

R Factor and Factor Levels: How to Create Factors in R

R Factor and Factor Levels - How to Create Factors in R

Factors are the list of unique values that are stored as integers. Factors are beneficial in data analysis for statistical modeling. Factors are data structures used for fields that take only predefined, a finite number of values (categorical data).  R Factor Factors in R are the data objects used to categorize the data and store … Read more

What is Subsetting in R and How to Subset 1D or 2D Data

What is Subsetting in R and How to Subset the Data

Subsetting means selecting the data from either a one-dimensional object like LETTERS or a two-dimensional object like DataFrame. You can select the data based on simple indexing, slicing and apply logical operators to get specific values. What is Subsetting in R Subsetting in R is a robust indexing feature to access object elements. Subsetting is used … Read more

Vector Math in R Programming Language

Vector Math in R Programming Language

A vector is a primary data type in R  that contains elements of the same type. Vector has a property length through which you can count the number of elements in the vector.  To check the vector’s data type, use typeof() function. How to Create Vector in R To create a Vector in R, use … Read more