- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to visualize the normality of a column of an R data frame?
The first step to analyze a variable is checking whether it is normally distributed or not and to visually do this, we create a histogram. If the histogram depicts a bell then we consider that the variable is normally distributed otherwise, it is not. We can create a histogram for any column of an R data frame by using hist function.
Example
Consider the below data frame −
set.seed(9) df<-data.frame(x1=rbinom(100,50,0.7),x2=rbinom(1000,50,0.7),x3=rbinom(5000,50,0.7))
Creating the histograms for x1, x2, and x3 −
hist(df$x1)
Output
hist(df$x2)
Output
hist(df$x3)
Output
- Related Articles
- How to use shapiro wilk test to check normality of an R data frame column?
- How to extract a single column of an R data frame as a data frame?
- How to find the sum of column values of an R data frame?
- How to find the unique values in a column of an R data frame?
- How to find the trimmed mean for a column of an R data frame?
- How to remove a column from an R data frame?
- How to standardized a column in an R data frame?
- How to find the sum of squared values of an R data frame column?
- How to visualize a data frame that contains missing values in R?
- How to find the inverse of log10 for an R data frame column?
- How to remove underscore from column names of an R data frame?
- How to add a new column at the front of an existing R data frame?
- How to rename a single column in an R data frame?
- How to replace a complete column in an R data frame?
- How to remove a character in an R data frame column?

Advertisements