You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
291 B
14 lines
291 B
3 years ago
|
install.packages("hflights")
|
||
|
install.packages("dplyr")
|
||
|
library(hflights)
|
||
|
library(dplyr)
|
||
|
|
||
|
str(hflights)
|
||
|
|
||
|
colnames(hflights)
|
||
|
hflight_df = tbl_df(hflights)
|
||
|
hflight_df
|
||
|
|
||
|
# gain이라는 컬럼명의 ArrDelay - DepDelay 값의 파생변수 생성
|
||
|
aa = mutate(hflight_df, gain=ArrDelay-DepDelay)
|
||
|
aa
|