title: “Mispriced Diamonds” author: “Tarun Sai Prasad K” date: “January 18, 2018” output: html_document
setwd("~/SIP/SIP Phase 2/R Programming/Udemy R Programming A-Z 1")
mydata <- read.csv(paste("Mispriced-Diamonds.csv", sep=""))
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.4.3
ggplot(mydata[mydata$carat<2.5,], aes(x=carat, y=price, colour= clarity))+
geom_point(alpha=0.1)+
geom_smooth()
## `geom_smooth()` using method = 'gam'
#The points where the curves touch each other are the places where there is a mispricing of Diamonds.