forked from core-methods-in-edm/github-practice
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRscript004.R
More file actions
43 lines (27 loc) · 679 Bytes
/
Rscript004.R
File metadata and controls
43 lines (27 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#https://www.youtube.com/watch?v=gCAwHbmOqCo
library(ggplot2)
---
#diamonds dataset
---
View(diamonds)
dim(diamonds)
ggplot(diamonds)
ggplot(diamonds, aes(carat, price))
d01 <- ggplot(diamonds, aes(carat,price))
d01 + geom_point()
d02 <- ggplot(diamonds, aes(carat,price,color=cut))
d02 + geom_point()
d03 <- ggplot(diamonds, aes(carat,price,color=color))
d03 + geom_point()
---
#iris dataset
---
View(iris)
dim(iris)
ggplot(iris)
ggplot(iris)
ggplot(iris, aes(Sepal.Length,Petal.Length))
d11 <- ggplot(iris, aes(Sepal.Length,Petal.Length))
d11 + geom_point()
d12 <- ggplot(iris, aes(Sepal.Length,Petal.Length,color=Species))
d12 + geom_point()