KNIME에서 R 연동하기
By Toy Lake | 2022년 7월 19일 |
R 연동하기 Rserve Package 설치 준비 (이미 하신분은 생략 가능) xcode command line tools 설치 ($ xcode-select –install) clang, gfortran 설치 (https://cran.r-project.org/bin/macosx/tools/ ) (optional) gettext 설치 ($ brew install gettext OR $ brew reinstall gettext) (optional) 아래 명령어 실행 cd /usr/binsudo ln -fsclang llvm-gcc-4.2sudo ln -fsclang++ llvm-g++-4.2 (optional) XQuartz 설치 (https://xquartz.org
R을 이용한 회사 재무 정보 수집하기
By Toy Lake | 2022년 7월 19일 |
getTable <- function(url=url){ tem <- read_html(url,encoding = "UTF-8") dat <- tem %>% html_nodes(".bus_board_txt1") %>% html_text tit <- tem %>% html_nodes('.bus_board_tit1') %>% html_text tit <- stri_trim_both(tit) tit <- tit[1:(which(nchar(tit)==0)[2]-1)] tit <- gsub(" ","",tit) tit <- gsub("[u00A0]","",tit) year <- tit[-1] dat<-data.fram
R Studio에서 MariaDB 연결하기
By 블루오션 [BLUE OCEAN] | 2016년 12월 19일 |
![R Studio에서 MariaDB 연결하기](https://img.zoomtrend.com/2016/12/19/c0093283_5857ebadcc5b1.png)
MariaDB든 MySQL이든 항상 필요한것은 클라이언트 라이브러리다.아래 패키지를 설치 한다. # yum install MySQL-python# yum install mariadb-devel 이제 R Studio화면에서 R script를 만들어 다음 코드를 입력하면 끝. install.packages("DBI")install.packages("RMySQL", type = "source") library(RMySQL)con <- dbConnect(MySQL(), host = "127.0.0.1", dbname = "DATABASE_NAME", user = "DB_USER", password = "DB_PASSWD", port = 3306)dbListTables(con