ggplot2

R/Exploratory data analysis

R for Data Science::scales 2

1. Date-time position scales date_breaks 인자를 이용해 그래프의 눈금을 연,월,주,일,시간,분 단위로 마크할 수 있다. 실습을 통해 공부해보자. date_base

R/Exploratory data analysis

ggplot2:: Faceting

이번 시간에는 ggplot에서 그래프들을 facet하는 것에 대해 공부해보겠다. 우선 facet이 무엇인지 알기 위해 코드부터 실행해보자. 1. facet_wrap() ggplot(mpg, aes(displ, hwy)) + geom_point() + facet_wrap(~class) 첫 번째 결과는 facet_wrap(~class)을 실행하지 않은 결과 두 번째 결과는 facet_wrap(~class)을 추가한 결과이다. 우측의 결과를 확대하여 어떤 변화가 적용된건지 확인해보자. x축과 y축이 각각 dsipl, hwy인 것은 고정이나 class에 value별로 plot이 나뉘어 시각화된 것을 확인할 수 있다. 1. What happens if you try to facet by a continuous v..

R/Exploratory data analysis

ggplot2::aesthetic mapping

exploratory data analysis (탐색적 자료 분석). 자료를 탐색하고 시각화하는 방법을 배우는 수업이다. 본 글은 EDA수업의 중간고사 대비를 위해 시작한 글쓰기라고 할 수 있겠다. 아래 사이트에 입장하면 공부를 위해 필요한 예시 자료가 있다. https://r4ds.had.co.nz/index.html Welcome | R for Data Science This book will teach you how to do data science with R: You’ll learn how to get your data into R, get it into the most useful structure, transform it, visualise it and model it. In this boo..

Abokadoh
'ggplot2' 태그의 글 목록