본문 바로가기
반응형

ggplot28

ggplot2 : 그래프 주변정리함수들 ggplot2 : 그래프 주변정리함수들 가로 세로 축 교환 g 2021. 1. 3.
ggplot2 : annotate() annotate() 그래프 내부에 도형을 그리거나 타이핑한다. p 2021. 1. 3.
ggplot2 : geom_bar() geom_bar() geom_bar is designed to make it easy to create bar charts that show counts (or sums of weights) > mpg # A tibble: 234 x 11 manufacturer model displ year cyl trans drv cty hwy fl class 1 audi a4 1.8 1999 4 auto(l5) f 18 29 p compact 2 audi a4 1.8 1999 4 manual(m5) f 21 29 p compact 3 audi a4 2 2008 4 manual(m6) f 20 31 p compact 4 audi a4 2 2008 4 auto(av) f 21 30 p compact 5 audi a4 2.. 2021. 1. 3.
ggplot2 : geom_histogram() geom_histogram() ggplot(diamonds, aes(carat)) + geom_histogram() ggplot(diamonds, aes(carat)) + geom_histogram(binwidth = 0.01) ggplot(diamonds, aes(carat)) + geom_histogram(bins = 200) # Rather than stacking histograms, it's easier to compare frequency # polygons ggplot(diamonds, aes(price, fill = cut)) + geom_histogram(binwidth = 500) ggplot(diamonds, aes(price, colour = cut)) + geom_freqp.. 2021. 1. 3.
ggplot2 : geom_boxplot() geom_boxplot() 최소값, 최대값, 평균, 4분위수와 이상값을 사각형 모양의 그래프로 출력함. > mpg # A tibble: 234 x 11 manufacturer model displ year cyl trans drv cty hwy fl class 1 audi a4 1.8 1999 4 auto(l5) f 18 29 p compact 2 audi a4 1.8 1999 4 manual(m5) f 21 29 p compact 3 audi a4 2 2008 4 manual(m6) f 20 31 p compact 4 audi a4 2 2008 4 auto(av) f 21 30 p compact 5 audi a4 2.8 1999 6 auto(l5) f 16 26 p compact 6 audi a4 2... 2021. 1. 3.
ggplot2 : geom_line() time series geom_line() is suitable for time series > economics # A tibble: 574 x 6 date pce pop psavert uempmed unemploy 1 1967-07-01 507. 198712 12.6 4.5 2944 2 1967-08-01 510. 198911 12.6 4.7 2945 3 1967-09-01 516. 199113 11.9 4.6 2958 4 1967-10-01 512. 199311 12.9 4.9 3143 5 1967-11-01 517. 199498 12.8 4.7 3066 6 1967-12-01 525. 199657 11.8 4.8 3018 7 1968-01-01 531. 199808 11.7 5.1 2878 8 1.. 2021. 1. 3.
ggplot2 : geom_point() geom_point 사용법 데이터 > mtcars mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2 Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 .. 2021. 1. 3.
R 관련 유용한 사이트들 한눈에 정리하는 ggplot2를 이용한 R 시각화 기초 1 https://kkokkilkon.tistory.com/17 [R] plyr 패키지로 그룹(join) 연산 하기 - adply(), ddply() 함수 https://data-make.tistory.com/59 2021. 1. 2.
반응형