%>% 연산자와 dplyr 패키지를 중심으로, 최근 R 문법 트렌드인 tidyverse 스타일을 정리했습니다. 본 슬라이드는 서울대병원 진단검사의학과 선생님들의 교육에 쓰일 예정입니다.
김진섭 대표는 4월 2일(목) 부터 6회에 걸쳐, 서울대병원 진단검사의학과 의국원들의 통계분석 능력 함양을 위한 맞춤 교육 이라는 주제로 R 교육을 진행할 예정입니다. 2주차에는 %>% 연산자와 dplyr 패키지를 중심으로, 최근 R 문법 트렌드인 tidyverse 스타일을 정리했습니다. 본 슬라이드는 서울대병원 진단검사의학과 선생님들의 교육에 쓰일 예정입니다.
실습은 클라우드 환경인 RStudio cloud 를 이용하여 진행한다. 회원가입 후, 아래를 따라 강의자료가 포함된 실습환경을 생성하자.
- https://rstudio.cloud 회원 가입
- 위쪽 “Projects” 클릭 후, “New Project” 를 눌러 “New Project from Git Repo” 를 선택 후, Repo 주소 https://github.com/jinseob2kim/lecture-snuhlab 입력.
Figure 1: Project 생성
강의록은 과거 글 https://blog.zarathu.com/posts/2019-01-03-rdatamanagement/ 을 참고하자.
회차 | 일시 | 주제 |
---|---|---|
1 | 4월 2일(목) 11-13시 | R 데이터 매니지먼트 기초 |
2 | 4월 14일(화) 11-13시 | R 데이터 매니지먼트 최근: tidyverse |
3 | 4월 28일(화) 11-13시 | R 데이터 시각화: ggplot2 |
4 | 5월 12일(화) 11-13시 | 의학연구에서의 기술통계 |
5 | 5월 26일(화) 11-13시 | 회귀분석, 생존분석 |
6 | 6월 9일(화) 11-13시 | R로 논문쓰기: rmarkdown |
tidyverse는 직관적인 코드를 장점으로 원래의 R 문법을 빠르게 대체하고 있다.
magrittr 패키지의 %>%
연산자로 의식의 흐름대로 코딩한다.
dplyr 패키지의 select
, mutate
, filter
, group_by
, summarize
함수는 %>%
와 찰떡궁합이다.
아래 슬라이드를 보거나 https://jinseob2kim.github.io/lecture-snuhlab/tidyverse 를 클릭하면 볼 수 있다.
If you see mistakes or want to suggest changes, please create an issue on the source repository.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. Source code is available at https://github.com/zarathucorp/blog, unless otherwise noted. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Kim (2020, April 14). Zarathu Blog: R 데이터 매니지먼트 최근: tidyverse. Retrieved from https://blog.zarathu.com/posts/2020-04-06-rdatamanagementtidyverse/
BibTeX citation
@misc{kim2020r, author = {Kim, Jinseob}, title = {Zarathu Blog: R 데이터 매니지먼트 최근: tidyverse}, url = {https://blog.zarathu.com/posts/2020-04-06-rdatamanagementtidyverse/}, year = {2020} }