## scatterplot in r: How to create scatterplot in r

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

Categories R

## factorial in R: How to Calculate Factorial of Number in R

The factorial of a number is the product of all the integers from 1 to that number. For example, the factorial of 5, which can be denoted as 5! is 5*4*3*2*1* = 120. You can not calculate the factorial of a negative number, and the factorial of zero is one you can denote as 0! … Read more

Categories R

## 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

Categories 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

Categories R

## sample function in R: The Complete Guide

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

Categories 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

Categories R

## 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

Categories 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

Categories R

## print in R: How to Print Variables using print() Function

Every language provides some functions that can help you print the data on the console, and R is no different. To print the data on the console in R, use the print() function. print in R The print in R is a built-in function that prints its argument and returns it invisibly. For example, the … Read more

Categories R

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

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

Categories R