This is my first class with RMarkdown and I’ll like to share some exciting facts with you.
To itemize the names of people in this class using *, use double underscore or double asterick for boldface
Five fruits that I like
To italicize, use single * or _
Joy
Joy
For headers, use hastags
To create chunks, use ctrl + Alt + I
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
#Set the working directory
setwd("C:\\Users\\USER\\Documents\\R")
# Load the dataset
restau <- read.csv("Dataset .csv")
# Check the summary of the data
summary(restau)
## Restaurant.ID Restaurant.Name Country.Code City
## Min. : 53 Length:9551 Min. : 1.00 Length:9551
## 1st Qu.: 301962 Class :character 1st Qu.: 1.00 Class :character
## Median : 6004089 Mode :character Median : 1.00 Mode :character
## Mean : 9051128 Mean : 18.37
## 3rd Qu.:18352292 3rd Qu.: 1.00
## Max. :18500652 Max. :216.00
## Address Locality Locality.Verbose Longitude
## Length:9551 Length:9551 Length:9551 Min. :-157.95
## Class :character Class :character Class :character 1st Qu.: 77.08
## Mode :character Mode :character Mode :character Median : 77.19
## Mean : 64.13
## 3rd Qu.: 77.28
## Max. : 174.83
## Latitude Cuisines Average.Cost.for.two Currency
## Min. :-41.33 Length:9551 Min. : 0 Length:9551
## 1st Qu.: 28.48 Class :character 1st Qu.: 250 Class :character
## Median : 28.57 Mode :character Median : 400 Mode :character
## Mean : 25.85 Mean : 1199
## 3rd Qu.: 28.64 3rd Qu.: 700
## Max. : 55.98 Max. :800000
## Has.Table.booking Has.Online.delivery Is.delivering.now Switch.to.order.menu
## Length:9551 Length:9551 Length:9551 Length:9551
## Class :character Class :character Class :character Class :character
## Mode :character Mode :character Mode :character Mode :character
##
##
##
## Price.range Aggregate.rating Rating.color Rating.text
## Min. :1.000 Min. :0.000 Length:9551 Length:9551
## 1st Qu.:1.000 1st Qu.:2.500 Class :character Class :character
## Median :2.000 Median :3.200 Mode :character Mode :character
## Mean :1.805 Mean :2.666
## 3rd Qu.:2.000 3rd Qu.:3.700
## Max. :4.000 Max. :4.900
## Votes
## Min. : 0.0
## 1st Qu.: 5.0
## Median : 31.0
## Mean : 156.9
## 3rd Qu.: 131.0
## Max. :10934.0
# Create a histogram or bar chart to visualize the distribution of price ranges
# among the restaurants.
ggplot(restau, aes(Price.range)) +
geom_histogram(stat = "count", fill = "skyblue", color = "orange") +
labs(title = "Distribution of Price ranges among Restaurants",
x = "Price Range", y = "Count")
## Warning in geom_histogram(stat = "count", fill = "skyblue", color = "orange"):
## Ignoring unknown parameters: `binwidth`, `bins`, and `pad`
\[x^2 + 2x + 3 = 0\]