## is.na in r: How to Use is.na() function in R

When working in a real-time dataset, you won’t get clean data. Real-world data is always filled with missing values. So if you are developing an algorithm that can predict the future values, you first need to clean the existing data, and based on that, you can create a model and feed the data. What is … Read more

## cbind in R: How to Bind Data Frame By Columns

The cbind() and rbind() functions are generic methods for data frames. These data frame functions will be used if at least one argument is a data frame and the other are vectors or matrices. To merge two data frames (datasets) horizontally, use the merge() function in the R language. cbind in R The cbind short for column … Read more

## exp function in R: How to Calculate Exponential Value

To create an exponential function, you let the independent variable be the exponent. Exponential functions are solutions to the simplest types of dynamical systems. The Natural Exponential Function equation is the following. Where e is “Eulers Number” = 2.718281828459 An exponential function can describe growth or decay. For example, the exponential decay function can be described … Read more

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

Suppose we wanted to identify the records for all the victims of floods in China. How could we do that? Here I use grep() to match the literal into the character vector of flooded victims. Let’s see how to use the grep() method and the difference between grep() and grepl() functions. grep in R The … Read more

## How to Convert Column to Numeric in R

You can easily convert a character vector into a numeric, but only if its vector items are “convertible” to numeric. If there’s one character item in a vector, you will get an error while converting that vector to numerical. Let me demonstrate this by an example. rv <- c(21, “k”, 19, 11, “b”, “l”) rv … Read more

## is.numeric in R: Check If Object is Numeric in R

All the decimal values are numerical values in R. That means if you assign any decimal value to that variable in R, it will become numeric. To check whether the argument is numeric or a data.frame with numeric columns in R, use the is.numeric() function. is.numeric in R The is.numeric in R is a built-in … Read more