Rylah's Study & Daily Life

02. R Study 2-2. Data Frame 본문

Study/R

02. R Study 2-2. Data Frame

Rylah 2022. 1. 16. 17:55
#2단원 데이터프레임 자료구조 #

area <- c("Seoul", "Busan", "Dae-gu")  #문자 벡터
score <- c(3, 1, 2) # 숫자 벡터

area.info <- data.frame(area, score) #데이터 프레임 만들기
area.info

iris

iris[2:4, c("Sepal.Width", "Petal.Width")]  # 2 ~ 4행 , 2 ~ 4열 데이터
iris[3:5,]  # 3 ~ 5행 데이터
iris [2:4, c(3,3)] #2 ~4행이고 3, 3열 데이터

'Study > R' 카테고리의 다른 글

03 . R Study 3-1. if ,else if , else  (0) 2022.01.17
02. R Study 2-3. File input & output  (0) 2022.01.17
02. R Study 2-1. Matrix  (0) 2022.01.16
01. R Study 1. Calc  (0) 2022.01.16
00. R 설치 및 R Studio 설치  (0) 2022.01.14