scatterplot in r: How to create scatterplot in r

How to Create Scatter Plot in R with Example

Graphs and charts are visual representations of the data. If you are working in the data science field, your goal is to make sense of the large data. The data analysis contains three processes. Data Extraction Cleaning and manipulating the data Create a graph or chart of the gathered data to analyze further. Graphs and … Read more

exp function in R: How to Calculate Exponential Value

R exp() Method with Example

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

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

sample function in R: The Complete Guide

sample() Function in R with Example

Statisticians usually need to take the samples of the dataset and then calculate the statistics. Taking a sample is easy with R because of the sample() method, as it is nothing more than a subset of data.  sample function in R The sample in R is a built-in function that takes a sample of the … Read more

How to Convert Column to Numeric in R

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

Not equal to in R: The Inequality Operator in R

Not equal to in R - The Inequality Operator in R

R language has many types of operators to carry out logical, comparative, and mathematical operations. For example, relational operators are used to compare between values. Not equal to in R The not equal operator in R is one of the relational operators, and it is the opposite of the equality operator. The not equal to … Read more

as.numeric in R: How to Convert to Numeric Value

As Numeric R - numeric() Function in R

The numeric() method creates or coerces objects of type “numeric”.  The is.numeric() is a built-in function used for a more comprehensive test of an object being interpretable as numbers. Factors are data structures that categorize the data or represent categorical data and save it on multiple levels. They can be saved as integers with an … Read more