R

ii  r-base          3.4.2-1ubuntu1    all     GNU R statistical computation and graphics system
ii  r-base-core     3.4.2-1ubuntu1    amd64   GNU R core of statistical computation and graphics system
ii  r-base-dev      3.4.2-1ubuntu1    all     GNU R installation of auxiliary GNU R packages
ii  r-base-html     3.4.2-1ubuntu1    all     GNU R html docs for statistical computing system functions
ii  r-cran-rmysql   0.10.13-1build1   amd64   GNU R package providing a DBI-compliant interface to MySQL
ii  r-cran-jsonlite   1.2-1build1     amd64   Robust, High Performance JSON Parser and Generator for R
ii  r-cran-curl       3.0-2           amd64   GNU R modern and flexible web client for R

ii  r-cran-rmysql  0.9-3-2       amd64   GNU R package providing a DBI-compliant interface to MySQL
$ R

R version 3.2.0 (2015-04-16) -- "Full of Ingredients"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library (RMySQL)
Loading required package: DBI
> mm <- dbDriver ("MySQL")
> conn <- dbConnect (mm, dbname="city",user="scott",password="tiger",host="localhost")
> query.result <- dbSendQuery (conn, "select * from (cities)")
> test.table <- fetch (query.result)
> dbDisconnect (conn)
[1] TRUE
> test.table
     ID NAME POPULATION  DATE_MOD
1 t3321 岡山     975842 2005-6-24
2 t3322 倉敷     314278  2005-8-8
3 t3323 津山     758641 2005-9-17
4 t3324 玉野     516432 2005-7-22
5 t3325 笠岡     327159 2005-2-28
6 t3326 井原     792581  2005-5-9
7 t3327 総社     635197 2005-4-10
8 t3328 高梁     485136 2005-10-8
9 t3329 新見     164827 2005-5-21
> q ()
Save workspace image? [y/n/c]: n


Arch Linux
# pacman -S r
$ yaourt -Sb r-mysql
パッケージのインストール

install.packages("jsonlite")

install.packages("curl")

result_aa

outarea_aa
outarea_bb
outarea_cc
outarea_dd
outarea_ee
outarea_ff
outarea_gg
outarea_hh

Return

May/09/2023 AM 08:15