_대문 | 방명록 | 최근글 | 홈피소개 | 주인놈
FrontPage › RNotebook

요즘(2017.08.23)에 Python을 좀 하다보니 jupyter notebook을 많이 사용하고 있다는 것을 알았다.
왜? 잘 모르겠다. 재현 가능성? 단계적인 코드 실행? 아.. 몰랑

암턴.. R Notebook도 있다. R studio 요즘 버전에서는 된다고 한다.
나도 해보자.

아래 그림과 같이 [File] -> [New File] -> [R Notebook]을 선택하면 된다.
r_notebook_menu.png

혹시나 아래와 같은 메시지 박스를 보게 되면..
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
---

r코드 추가
Ctrl+Alt+I

r코드 실행
Ctrl+Shift+Enter

preview
Ctrl+Shift+K

예제
r_notebook_test.png

preview결과
r_notebook_test_preveiw.png


여기까지 해보니...
이미지 파일도 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
결과는 아래...

rmarkdown.png

댓글 남기기..
이름: : 오른쪽의 새로고침을 클릭해 주세요. 새로고침
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2019-01-23 11:32:33

제 아이를 남들에게 비교하지 않기 (오숙희)