문서에 구조를 잡아 보세요
이제부터는 지난 챕터에서 만든 플롯을 사용해 단계별 RMarkdown 보고서를 만들어 볼 거예요. 첫 단계로, 섹션 헤더를 통해 문서에 구조를 추가해 보겠습니다.
추신: 헤더를 나타내는 기호와 텍스트 사이에는 공백을 하나 넣는 것이 모범 사례예요! 이렇게 하면 Markdown 문법이 깔끔하고 읽기 쉬워집니다.
이 연습은 강의의 일부입니다
Tidyverse로 데이터 소통하기
연습 안내
- 이 문단들의 섹션 제목(예: "Summary")을 적절한 RMarkdown 문법을 사용해 헤더로 바꾸세요.
- "Summary", "Preparations", "Analysis"는 두 번째 수준 헤더로, "Data", "Preprocessing", "Results"는 세 번째 수준 헤더로 만드세요.
위에서 설명한 대로 헤더에 공백을 포함하는 모범 사례를 꼭 지켜 주세요!
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
{"my_document.Rmd":"---\ntitle: \"The reduction in weekly working hours in Europe\" \nsubtitle: \"Looking at the development between 1996 and 2006\"\nauthor: \"Insert your name here\"\noutput: html_document\n---\n\nSummary\n\nThis is where you are going to quickly summarize what you did.\n\nPreparations\n\nThis is where you will load the necessary R packages.\n\nAnalysis\n\nData\n\nThis is where you will load the data. \n\nPreprocessing\n\nThis is where you will preprocess the data.\n\nResults\n\nThis is where you will plot the data.\n\n\n"}