## Standard deviation in R: How to Use sd() in R

We have already seen how to calculate percentile and variance in R programming. We have also seen how to calculate Mean and Mode in R. Let’s see how to compute the standard deviation, but before that, let’s understand what SD is. What is Standard Deviation The standard deviation of a population is the square root of … 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

## dnorm in r: What is dnorm() function in r

The dnorm() function gives the density. The pnorm() function gives the distribution function. The qnorm() function gives the quantile function. The rnorm() function generates random deviates. dnorm in r The dnorm in r is a built-in function that calculates the density function with a mean(μ) and standard deviation(σ) for any value of x, μ, and σ. … Read more

There are four forms of the extract operator in R: [, [[, \$, and @. The fourth form is the slot operator and is used to extract content from objects built with the S4 object system, also known as a formally defined object in R. Most beginning R users don’t work with formally defined objects … Read more

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

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

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

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