요즘(2017.08.23)에 Python을 좀 하다보니 jupyter notebook을 많이 사용하고 있다는 것을 알았다.
왜? 잘 모르겠다. 재현 가능성? 단계적인 코드 실행? 아.. 몰랑
암턴.. R Notebook도 있다. R studio 요즘 버전에서는 된다고 한다.
나도 해보자.
아래 그림과 같이
[File] -> [New File] -> [R Notebook]을 선택하면 된다.
혹시나 아래와 같은 메시지 박스를 보게 되면..
Required package versions could not be found:
knitr 1.14 is required but 1.11 is available
tibble 1.1 is not available
rmarkdown 1.1 is required but 0.8.1 is available
Check that getOption("repos") refers to a CRAN repository that contains the needed package versions.
다음과 같이 조치하면 된다.
install.packages("knitr", repos = "http://cran.r-project.org")
install.packages("tibble", repos = "http://cran.r-project.org")
install.packages("rmarkdown", repos = "http://cran.r-project.org")
r markdown 문법 몇 개만 알면 된다.
title
---
title: "여기에 제목을 넣으면 된다."
output: html_notebook
---
예제
preview결과
여기까지 해보니...
이미지 파일도 html 파일에 포함되고해서 파일 1개로 분석결과를 코드까지 공유할 수 있다는 장점이 있다.
음.. 좋군..
---
title: "문서 제목"
output: html_notebook
---
# 제목 1
## 제목 2
### 제목 3
#### 제목 4
##### 제목 5
###### 제목 6
***
* 항목1
* 항목2
+ 하위 항목1
+ 하위 항목2
1. 항목1
2. 항목2
+ 하위 항목 1
+ 하위 항목 2
_기울인 글씨_
__굵은 글씨__
컬럼1 | 컬럼2
- | -
값1 | 값2
결과는 아래...