datasets::airquality()
?airquality # airquality 데이터셋 도움말 보기
# 아래는 example(airquality) 입니다.
require(graphics)
pairs(airquality, panel = panel.smooth, main = "airquality data")


'Dataset_info > airquality' 카테고리의 다른 글
airquality 데이터셋 (0) | 2022.02.22 |
---|
datasets::airquality()
?airquality # airquality 데이터셋 도움말 보기
# 아래는 example(airquality) 입니다.
require(graphics)
pairs(airquality, panel = panel.smooth, main = "airquality data")
airquality 데이터셋 (0) | 2022.02.22 |
---|
datasets::airquality()
R이 시작될 때, datasets 패키지가 자동으로 호출된다. 따라서 R Commander를 실행할 때, datasets 패키지는 첨부 패키지화되어 메뉴창을 통해서 내부 데이터셋을 찾고 불러올 수 있다.
메뉴창에서 순서대로 데이터 > 패키지에 있는 데이터 > 첨부된 패키지에서 데이터셋 읽기... 를 선택하면 다음과 같은 창이 등장한다.
출력창을 보면, airquality라는 데이터셋에는 6개의 변수가 있고, 각 변수는 수치형 정보를 담고 있다.
Month 변수는 최소 5에서 최대 9로 값이 있는데, 정확히는 5월부터 9월까지일 것이다. 한달 한달을 뜻하는 월(month)은 5월이 9월보다 크다고 할 수 없고, 5월, 6월, 7월, 8월, 9월 등으로 개체화되어 분리된다. 다시 말하면, 요인형 변수가 되어야 한다는 뜻이다.
그럼 왜, airqualty 데이터셋의 Month 변수는 수치형으로 되어 있을까. 원자료를 R의 데이터셋으로 불러오는 과정에서 해당 변수의 요인화과정이 생략되었을 것이다.
airquality {datasets} | R Documentation |
Daily air quality measurements in New York, May to September 1973.
airquality
A data frame with 153 observations on 6 variables.
[,1] | Ozone | numeric | Ozone (ppb) |
[,2] | Solar.R | numeric | Solar R (lang) |
[,3] | Wind | numeric | Wind (mph) |
[,4] | Temp | numeric | Temperature (degrees F) |
[,5] | Month | numeric | Month (1--12) |
[,6] | Day | numeric | Day of month (1--31) |
Daily readings of the following air quality values for May 1, 1973 (a Tuesday) to September 30, 1973.
The data were obtained from the New York State Department of Conservation (ozone data) and the National Weather Service (meteorological data).
Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A. (1983) Graphical Methods for Data Analysis. Belmont, CA: Wadsworth.
require(graphics)
pairs(airquality, panel = panel.smooth, main = "airquality data")
airquality 데이터셋 예제 (0) | 2022.06.24 |
---|