티스토리 뷰

빅데이터/R

R정복 2일차

Mac's analystics 2017. 1. 9. 15:46

자료는 일단 도수분포표화 해야 쓸모가 있다. 그냥 나열되어있는 자료는 노 쓸모. 


도수분포표로 평균과 분포를 확인해야 전체적인 형태를 파악할 수 있기 때문..



오늘부터는 자료를 같이 보기위해 R Markdown으로 작성해야겠다. 

경로에 한글이 있으면 패키지가 자동설치 안되므로 install.packages(c("rmarkdown","xtable"))

라고 입력을 직접 해줘야 설치가 된다. 


검색은 http://rseek.org/ 에서 한다. 

레퍼런스는 https://cran.r-project.org/doc/manuals/r-release/fullrefman.pdf 에서 볼것. 

가벼운건 ? 나 help 명령어를 이용해서 보면 됨. 


패키지 설치는 install.packages . 프로젝트에 적용은 library , require 로 적용한다. 


install.packages("rgl")

install.packages("ggplot2")

install.packages("ggthemes")

install.packages("data.table")

install.packages("devtools")

install.packages("dplyr")

install.packages("plyr")

install.packages("reshape2")

install.packages("scales")

install.packages("stringr") 


R까기2에 나온 기본 패키지. 

아래는 챕터 2 R 마크다운 테스트

R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.


Knit 을 이용해 html 로 퍼블리싱 한 후 브라우져에서 연 다음 소스를 복붙하면 된다. 

다음부턴 모든 내용을 R마크다운에 써서 올리는게 편할듯 하다. 

'빅데이터 > R' 카테고리의 다른 글

NLP 이용한 주요 워드카운트  (0) 2017.02.01
R Markdown 문법  (0) 2017.01.09
R정복 1일차  (0) 2017.01.05
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
TAG
more
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함