study 03/20

This commit is contained in:
2026-03-20 17:04:54 +09:00
parent 35d1cd223e
commit ae3913bf3d
6 changed files with 82 additions and 516 deletions
+14
View File
@@ -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)