## grepl in R: How to Use R grepl() Function

We often come across a functionality where we want to check something by comparing it with patten. We use a regular expression to match specific character vectors in the string. Let’s see how to use regular expression in R. The functions like grep(), grepl(), regexpr(), gregexpr(), and regexec() search for matches to argument pattern within … Read more

Categories R

## Standard Error in R: How to Calculate Standard Error

R does not come with a standard error function. You need to either create a standard error function or use a package like plotrix to calculate. Standard Error in R The standard error in R is just the standard deviation divided by the square root of the sample size. The variance of the sampling distribution … Read more

Categories R

## Mode in R: How to Find Mode of Vectors

The mode in R is the value with the highest number of occurrences in a set of data. Unlike the mean and median, the mode can have both numeric and character data. Mode in R There is no built-in function to calculate the mode in R. To calculate mode in R, you have to create … Read more

Categories R

## percentile in R: How to Calculate Percentile using quantile()

Percentages and percentiles are related in many ways, and sometimes these names are used interchangeably, but they are different terms. A percentage describes a fraction, while a percentile describes the fraction of the data points of a data set below a specific point. Both a percentage and percentile value provide helpful information about the dataset, … Read more

Categories R

## R Date Format: How to format dates using format()

R programming language provides several functions to deal with date and time. Formatting and converting dates from one format to another is a frequent task any developer could face. The general rule of thumb for dealing with date/time in R is to use the simplest technique possible. Otherwise, it gets ugly and complex. R Date … Read more

Categories R

## scale in R: How to Use scale() Function

Scaling is a process to compare the data that is not measured in the same approach. Scaling is the normalization of a dataset using the mean value and standard deviation. Scaling is often used with vectors or columns of a data frame. The scaling is especially helpful in a regression analysis where the magnitude range … Read more

Categories R

If you have a large dataset to analyze, it will get tough to condense a vast dataset that has 30+ columns and have thousands of rows. To solve this problem, you can use either head() or tail() function. It gives you a snapshot of that large dataset. In this tutorial, we will see how to … Read more

Categories R

## Mean in R: How to Calculate Average in R

The average of a number represents the middle or central value in the set of data. For example, the mode, median, or mean that calculated by dividing the sum of the values set by their count of the number. The mathematical formula for calculating the average is the following. Average in R To calculate the … Read more

Categories R

## str in R: How to Check Data Structure of Object in R

R language consists of different data types, and each data type has its unique ability. When we are working with large datasets, sometimes, we need to get an overview of the specific structure, and to solve that problem, we can use the str() function. It compactly displays the internal structure of an R object. str … Read more

Categories R

## How to Remove Rows in R

To understand a detailed analysis of the dataset, sometimes, we want to remove specific rows and clear the data to analyze more efficiently. This is where subsetting is essential and, in other words deleting specific rows. How to remove rows in R To remove the rows in R, use the subsetting in R. There is … Read more

Categories R