Standard deviation in R: A Beginner’s Guide

How to Calculate Standard Deviation in R using sd()

To measure the response time spread around the mean, use the standard deviation. We have already seen how to calculate percentile and variance in R programming. We have also seen how to calculate the Mean and Mode in R. Let’s see how to calculate the standard deviation, but before that, let’s understand what SD is. … Read more

grepl in R: How to Use R grepl() Function

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

We often see a functionality where we want to check something by comparing it with a pattern. We use a regular expression to match specific character vectors in the string. Let’s see how to use regular expressions in R. The functions like grep(), grepl(), regexpr(), gregexpr(), and regexec() search for matches to argument pattern within … Read more

How to Use pnorm() Function in R

pnorm() Function in R with Example

The normal distribution in R is categorized as rnorm, dnorm, and pnorm. The rnorm, dnorm, and pnorm functions in R help us calculate the normal density, distribution, and quantile function for a set of values. pnorm in R The pnorm in R is a built-in function that returns the Cumulative Density Function (CDF) value of the … Read more

as factor in R: How to Use as.factor() Function

as.factor() Function in R with Example

Factors are used to represent categorical data. To create a factor variable in R, use the factor() function. Factors are stored as integers and have labels associated with these unique integers. as.factor in R The as.factor() is a built-in R function that converts a column from numeric to factor. The as.factor() method takes a column … Read more

rnorm: What is rnorm() Function in R

rnorm() Function in R - Generate Random Numbers 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 the variable’s value on the horizontal axis and the values’ count on the vertical axis. The center of the curve represents the mean of the dataset. The normal distributions behave differently in … Read more

head in R: The Complete Guide

R head() Function- How to Get First Part of R Object

If you have a large dataset to analyze, condensing a vast dataset with 30+ columns and thousands of rows will get tough. To solve this problem, you can use either head() or tail() function. It gives you a snapshot of that large dataset. In this tutorial, we will see how to use a head() function with … Read more

as.Date in R: How to Use as.Date() Function

as.Date() Function in R with Example

To get today’s date in R, use the Sys.Date() function. Sys.Date() Output [1] “2021-03-11” To get the current date and time in R, use the date() function. date() Output [1] “Thu Mar 11 16:59:16 2021” Dates can be imported from character, numeric, POSIXlt, and POSIXct formats in R using as.Date() method. as.Date in R The … Read more