File Edit Codę View Project Workspace Plots Tools Help
0 @ |
e |
( * Go to file/function |
(J| |
Project: (Nonę) ▼ |
diamondPricing.R' X formatPlot.R Jdiamonds
kr e
Workspace |
History |
«=□ |
'(Load ▼ |
i j SaveImport Dataset-- ^Clear Ali |
_© |
Data | ||
diamonds |
53940 obs. of 10 variablGS |
m |
Values | ||
avGSizg |
0.7979 | |
clarity |
charactGr[8] | |
P |
ggplot[8] |
i i Source on Save & ___Source ▼ |_.
1 library(ggplot2) >
2 source("plots/formatPlot. R")
3
4 view(diamonds)
5 summary(diamonds)
6
7 summary(diamonds$price)
8 avesize <- round(mGan(diamondsScarat), 4)
9 cl arity <- lGVGls(diamonds$clarity)
10
11 p <- qplot(carat, pricG,
12 data=diamonds, color=clarity,
13 xlab="carat", ylab="PricG",
14 main="Diamond Pricing")
15
Functions
format.plot(plot, sizG)
Files Plots Packages Help =n
O
Jr:' Zoom Export-- O. /ciearAII
15:1 O (Top Level) i
R Script
n
Console -/
X
Min. |
: 0.000 |
Min. |
: 0.000 |
Min. |
: 0.000 |
Ist Qu. |
: 4.710 |
Ist Qu. |
: 4.720 |
Ist Qu. |
: 2.910 |
Median |
: 5.700 |
Median |
: 5.710 |
Median |
: 3.530 |
Mcan |
: 5.731 |
Mcan |
: 5.735 |
Mcan |
: 3.539 |
3rd Qu. |
: 6.540 |
3rd Qu. |
: 6.540 |
3rd Qu. |
: 4.040 |
Max. |
:10.740 |
Max. |
:58.900 |
Max. |
:31.800 |
> summary(diamonds$pricG)
Min. Ist Qu. Median 326 950 2401
> avcsizG <- round(mGan(diamonds$carat), 4)
> cl arity <- 1gvg!s(diamondsSclarity)
> p <- qplot(carat, pricG,
+ data=diamonds, color=clarity,
+ xlab="carat", ylab="PricG",
+ main="Diamond Pricing")
>
> format.plot(p, sizG=24)
MGan 3rd Qu. Max. 3933 5324 18820
15000-
10000-
5000-
I
3.5
Clarity
* n
SI2
SI1
VS2
VS1
WS2
WS1
IF