basic of how to plot in r
View(faithful)
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.2.2
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.5
## ✔ tibble 3.1.8 ✔ dplyr 1.0.10
## ✔ tidyr 1.2.1 ✔ stringr 1.4.1
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## Warning: package 'forcats' was built under R version 4.2.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
qplot(x = faithful$waiting, geom = "histogram" )
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qplot(x = faithful$eruptions, geom = "freqpoly", xlab = "Waiting Time", ylab = "frequancy", main = "salih", col = I("darkblue"), fill = I("lightblue"), bins = 50 )
## Warning: Ignoring unknown parameters: fill

qplot(x = faithful$eruptions, geom = "histogram", xlab = "Waiting Time", ylab = "frequancy", main = "salih", col = I("darkblue"), fill = I("lightblue"), bins = 50)

qplot(faithful$eruptions, geom = "histogram", xlab = "Waiting Time", ylab = "frequancy", main = "salih", col = I("darkblue"), fill = I("lightblue"), bins = 50)

qplot(x = waiting,data = faithful, geom = "histogram", xlab = "Waiting Time", ylab = "frequancy", main = "salih", col = I("darkblue"),)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggplot(faithful,aes(x = waiting )) + geom_histogram(col = "black") + labs(x = "waiting time", y = "salih" )
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

quantile(faithful$waiting , .35)
## 35%
## 65
quantile(faithful$waiting, c(.35, .70, .95 ) )
## 35% 70% 95%
## 65 81 89