getwd()
## [1] "C:/Users/skirmantas/OneDrive/Desktop"
setwd("C:/Users/skirmantas/OneDrive/Desktop")
duom <- read.csv2("C:/Users/skirmantas/OneDrive/Desktop/Duomenys/DPP.csv", header = TRUE, sep = ";", dec = ".")
str(duom)
## 'data.frame': 53940 obs. of 10 variables:
## $ Carat.Weight.of.Daimond.: num 0.23 0.21 0.23 0.29 0.31 0.24 0.24 0.26 0.22 0.23 ...
## $ Cut.Quality. : chr "Ideal" "Premium" "Good" "Premium" ...
## $ Color : chr "E" "E" "E" "I" ...
## $ Clarity : chr "SI2" "SI1" "VS1" "VS2" ...
## $ Depth : num 61.5 59.8 56.9 62.4 63.3 62.8 62.3 61.9 65.1 59.4 ...
## $ Table : num 55 61 65 58 58 57 57 55 61 61 ...
## $ Price.in.US.dollars. : int 326 326 327 334 335 336 336 337 337 338 ...
## $ X.length. : num 3.95 3.89 4.05 4.2 4.34 3.94 3.95 4.07 3.87 4 ...
## $ Y.width. : num 3.98 3.84 4.07 4.23 4.35 3.96 3.98 4.11 3.78 4.05 ...
## $ Z.Depth. : num 2.43 2.31 2.31 2.63 2.75 2.48 2.47 2.53 2.49 2.39 ...
Ratio – Carat.Weight, Depth, Table, Price in US, Lenght, Width, Depth
Ordinal – Cut Quality, Color, Clarity
library(ggpubr)
## Įkeliamas reikalingas paketas: ggplot2
par(mfrow = c(2,2))
boxplot(duom$Price.in.US.dollars. , main = "Price boxplot")
boxplot(duom$Table , main = "Measures boxplot")
boxplot(duom$X.length., main = "Lenght boxplot")
boxplot(duom$Y.width. , main = "Width boxplot")
par(mfrow = c(1,3))
boxplot(duom$Carat.Weight.of.Daimond. , main = "Carat Weight boxplot")
boxplot(duom$Z.Depth. , main = "Depth first boxplot")
boxplot(duom$Depth , main = "Depth second boxplot")
par(mfrow = c(3,1))
plot.ts(duom$Carat.Weight.of.Daimond. , col = "gold",main = " Diamond weight by price ", xlab = "Price", ylab = "Weight")
plot.ts(duom$Z.Depth. , col = "yellow", ylim = c(0,8), ,main = " Diamond depth by price ", xlab = "Price", , ylab = "Depth")
plot.ts(duom$Depth , col = "blue" ,main = " Diamond depth by price ", xlab = "Price" , ylab = "Depth2")
par(mfrow = c(1, 2))
hist(duom$Carat.Weight.of.Daimond, main = " Diamond Weight by price " , ylab = "Price", xlab = "Weight")
hist(duom$Z.Depth., main = "Diamond depth by price ", ylab = "Pice", xlab = "Depth")
hist(duom$X.length., main = "Diamond Lenght by diamond price", xlab = "Lenght", ylab = "Diamond price")