I'm trying to plot the histogram of Bloodpressure vs the Outcome by using ggplot but the graph given in R is not follow the data provided in the data file. This is the link for the data file: https://www.kaggle.com/kandij/diabetes-dataset
dataset=read.csv(file.choose(),header=T)
attach(dataset)
View(dataset)
str(dataset)
summary(dataset)
Bloodpressure_Freq <- frequency(dataset$BloodPressure)
Positive_or_Negative <- as.factor(dataset$Outcome)
ggplot(data = dataset,
aes(x = BloodPressure, Bloodpressure_Freq, fill =Positive_or_Negative)) +
geom_col()+
labs(title = "Histogram for Age", x = "Age", y = "Count") +
theme(plot.title = element_text(hjust = 0.5))