sapply: What is sapply() Function in R

R sapply - How to Use sapply() Function in R

The sapply() function works like lapply(), but it tries to interpret the output to the most fundamental data structure possible, either Vector or Matrix. The sapply() is a “wrapper” function for lapply(). The apply() function is bundled with R essential package if installed with Anaconda. The apply() function returns the vector or array by applying a … Read more

pnorm: What is pnorm() Function in R

pnorm() Function in R with Example

The pnorm() function calculates the c. d. f. where X is normal. Optional arguments described on the online documentation specify the parameters of the particular normal distribution. pnorm in R The pnorm in R is a built-in function that returns the value of the cumulative density function (cdf) of the normal distribution given a certain random … Read more

How to Use setwd() Function in R

setwd() function in R with Example

The working directory can be your best friend or ruthless adversary. Confusion about the working directory is a great time waster. Whenever you want to perform some advanced action, you need to ensure that you are in the correct directory. Otherwise, it can create an issue for you. getwd in R The getwd in r … Read more

rnorm: What is rnorm() Function in R

rnorm() Function in R - Generate Random Numbers in R

The rnorm() function in R generates a random number using a normal(bell curve) distribution. Thus, the rnorm() function simulates random variates having a specified normal distribution. What is Normal Distribution in R The normal distribution is the collection of random data from independent sources. We get the bell shape curve by plotting a graph with … Read more

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