티스토리 뷰
INTRO
1. scatter plot : 산점도 그래프, 산점도 행렬
2. histogram : 히스토그램, 막대그래프(bar chart)
3. box plot : 상자그림
1. scatter plot
scatter plot
x, y 변수 값을 평면에 점을 찍어 한눈에 볼 수 있도록 표현
test_plot_scatter.R
## scatter plot
height = sample(x=150:180, size=20)
weight = sample(x=50:90, size=20)
plot(height, weight)
출력결과
scatter plot:matrix
다변수에 대해 상호간 산점도를 한눈에 볼 수 있도록 확장된 산점도 행렬
"main=" : 최상단 제목
"pch=" : 점 모양
"bg=" : 점 색상
test_plot_scatter_matrix.R
## scatter plot:matrix
pairs(iris[1:4], main="Anderson's Iris Data -- 3 species",
pch=21, bg=c('red','green3','blue')[unclass(iris$Species)])
출력결과
2. histogram
탐색적 자료 분석에서 자료 분포를 손쉽게 확인하는 방법
test_plot_histogram.R
## histogram
statscore = sample(c(30:100), size=50, replace=T)
#print(statscore)
hist(statscore, prob=T)
출력결과
3. box plot
최댓값, 최소값, 중앙값, 사분편차를 사용하여 자료의 분포를 나타내는 방법
test_plot_box.R
## boxplot
statscore = sample(c(30:100), size=50, replace=T)
#print(statscore)
boxplot(statscore)
출력결과
반응형
'R' 카테고리의 다른 글
(macOS)[R] sqldf, plyr (0) | 2022.03.30 |
---|---|
(macOS)[R] reshape (0) | 2022.03.29 |
(macOS)[R] paste, substr, as., date, format (0) | 2022.03.28 |
(macOS)[R] 반복문 : for, while | 조건문 : if/else | 사용자 정의 함수 : function() (0) | 2022.03.28 |
(macOS)[R] 데이터 다루기(data handle) (0) | 2022.03.28 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- COVID-19
- git
- 코로나
- pyserial
- server
- DS18B20
- MacOS
- Python
- Regression
- Model
- Templates
- analysis
- 확진
- r
- Pandas
- 코로나19
- 자가격리
- Raspberry Pi
- SSH
- Django
- raspberrypi
- template
- CSV
- sublime text
- DAQ
- arduino
- github
- 라즈베리파이
- vscode
- ERP
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함