pacman::p_load(knitr, tidyverse, ggplot2, data.table, mlbench); library(ntelsBI) opts_chunk$set(fig.path = "output/figure/", fig.align = "center", out.width = "80%", warning = F, message = F)
devtools::install_github("ntels-BI/ntelsBI")
ml()
함수를 이용하여 기계학습 훈련 및 평가를 수행
iris
꽃잎분류ml(iris, "Species", method = "rpart") %>% fitSummary(type = "cla")
Sonar
의 Class
분류 (Class = "R" 이 주관심사일 경우)data(Sonar, package = "mlbench") ml(Sonar, "Class", method = "glm") %>% fitSummary(type = "cla", positive = "R")
mtcars
mpg 예측ml(mtcars, "mpg", method = "rf") %>% fitSummary(type = "reg")
spCoordinateTrans()
function : 위경도 좌표변환exdata <- data.frame(long = c(1039197, 1041137, 1039216, 1037176), lat = c(1926417, 1927056, 1927526, 1924963)) exdata # UTM-K(GRS-80) spCoordinateTrans(exdata$long, exdata$lat) # To WGS84
addressToCoord()
function : 주소에 대한 좌표변환 (Google Maps API 를 이용)addressToCoord("강남구청역")
library(leaflet) library(dplyr) pd <- data.frame(add = c("강남구청역")) %>% mutate(long = addressToCoord(add)[1], lat = addressToCoord(add)[2]) leaflet(data = pd) %>% addTiles() %>% addMarkers(~long, ~lat, popup = ~as.character(add), label = ~as.character(add))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.