How to create histogram in R?

Description

To create a histogram for the given data using R programming.

Histograms:

  • Each bar in histogram represents the
    height of the number of values
    present in that range.
  • R Function : hist()

#Data Visualization in Histogram

#Read File
print(getwd())
setwd(“/home/soft13″)
print(getwd())
data<-read.csv(‘input.csv’)
print(data)

#Histogram
hist(data$salary, main=”Histogram Plot”,xlab=””,ylab=””,col=”violet”,xlim=c(300,1000),ylim=c(0,5))

Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit