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

How to Calculate Standard Deviation in R using sd()

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

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

dnorm() Function in R with Example

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

How to Use Dollar sign in R

Dollar sign in R with Example

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

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

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