# Load the data
library(DT)
## Warning: package 'DT' was built under R version 4.4.2
juice<-read.csv("Pinapple_juice.csv")
datatable(juice, caption = "Pinapple Juice")

What is the median of pineapple juice?

library(glue)
glue("The median of pineapple juice is {median(juice$Pinapple.juice)}")
## The median of pineapple juice is 130

What is the mean of pineapple juice?

glue("The mean of pineapple juice is {round(mean(juice$Pinapple.juice), 2)}")
## The mean of pineapple juice is 130.58

What is the inner quartile?

glue("The inner quartile of pineapple juice is {IQR(juice$Pinapple.juice)}")
## The inner quartile of pineapple juice is 28

What is the 65th percentile?

glue("The 65th percentile of pineapple juice is {quantile(juice$Pinapple.juice, 0.65)}")
## The 65th percentile of pineapple juice is 139

What is the standard deviation?

glue("The standard deviation of pineapple juice is {round(sd(juice$Pinapple.juice), 2)}")
## The standard deviation of pineapple juice is 21.32

What is the variance?

glue("The variance of pineapple juice is {round(var(juice$Pinapple.juice), 2)}")
## The variance of pineapple juice is 454.63

What is the range?

glue("The range of pineapple juice is {diff(range(juice$Pinapple.juice))}")
## The range of pineapple juice is 117