study 03/20
This commit is contained in:
+14
@@ -173,8 +173,10 @@ library(ggplot2)
|
||||
|
||||
head(diamonds)
|
||||
View(diamonds)
|
||||
tail(diamonds)
|
||||
head(Titanic)
|
||||
View(Titanic)
|
||||
tail(Titanic)
|
||||
|
||||
## data structure ##
|
||||
str(diamonds)
|
||||
@@ -199,3 +201,15 @@ b = diamonds[diamonds$price >= 18000, ] # 다이아몬드의 가격을 기준
|
||||
b
|
||||
c = diamonds[(diamonds$cut == 'Fair') & (diamonds$price >= 18000), ]
|
||||
d = diamonds[(diamonds$cut == 'Fair') | (diamonds$price >= 18000), ]
|
||||
|
||||
diamonds$xyz = diamonds$x + diamonds$y + diamonds$z
|
||||
View(diamonds)
|
||||
|
||||
diamonds$means = diamonds$xyz/3
|
||||
|
||||
kkk = diamonds[-c(10,20,30),]
|
||||
str(kkk)
|
||||
kkk1 = diamonds[-c(100:200),]
|
||||
str(kkk1)
|
||||
kkk2 = diamonds[-seq(from=1, to=length(diamonds), by=10),]
|
||||
str(kkk2)
|
||||
|
||||
Reference in New Issue
Block a user