Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
R をインストールする / Installing R
Search
Kenji Saito
PRO
November 28, 2024
Technology
0
95
R をインストールする / Installing R
早稲田大学大学院経営管理研究科「企業データ分析」2024 冬のオンデマンド教材 第2回で使用したスライドです。
Kenji Saito
PRO
November 28, 2024
Tweet
Share
More Decks by Kenji Saito
See All by Kenji Saito
続・インクルーシブな社会へ / Continuing Towards an Inclusive Society
ks91
PRO
0
16
AGI (人工一般知能) と創る新しく奇妙な社会 / New and Stranger Society built with AGI
ks91
PRO
0
63
回帰分析/大規模言語モデルと統計 / Regression Analysis, Large Language Models and Statistics
ks91
PRO
0
68
多重比較/相関分析 / Multiple Comparison and Correlation Analysis
ks91
PRO
0
64
アカデミーキャンプ 2025冬「考えるのは奴らだ」 / Academy Camp 2025 Winter - Live and Let Think DAY 3
ks91
PRO
0
60
アカデミーキャンプ 2025冬「考えるのは奴らだ」 / Academy Camp 2025 Winter - Live and Let Think DAY 2
ks91
PRO
0
47
アカデミーキャンプ 2025冬「考えるのは奴らだ」 / Academy Camp 2025 Winter - Live and Let Think DAY 1
ks91
PRO
1
73
インクルーシブな社会へ / Toward an Inclusive Society
ks91
PRO
0
21
P 値と有意差/分散分析 / P-value, Significant Difference and Analysis of Variance
ks91
PRO
0
70
Other Decks in Technology
See All in Technology
OpenID BizDay#17 みんなの銀行による身元確認結果の活用 / 20250219-BizDay17-KYC-minna-no-ginko
oidfj
0
210
Amazon Aurora のバージョンアップ手法について
smt7174
1
120
ビジネスモデリング道場 目的と背景
masuda220
PRO
9
690
AWSではじめる Web APIテスト実践ガイド / A practical guide to testing Web APIs on AWS
yokawasa
4
200
ExaDB-XSで利用されているExadata Exascaleについて
oracle4engineer
PRO
3
170
依存パッケージの更新はコツコツが勝つコツ! / phpcon_nagoya2025
blue_goheimochi
3
200
OpenID BizDay#17 KYC WG活動報告(法人) / 20250219-BizDay17-KYC-legalidentity
oidfj
0
450
AI Agent時代なのでAWSのLLMs.txtが欲しい!
watany
2
170
Raycast AI APIを使ってちょっと便利な拡張機能を作ってみた / created-a-handy-extension-using-the-raycast-ai-api
kawamataryo
0
190
エンジニアが加速させるプロダクトディスカバリー 〜最速で価値ある機能を見つける方法〜 / product discovery accelerated by engineers
rince
4
540
分解して理解する Aspire
nenonaninu
2
750
Apache Iceberg Case Study in LY Corporation
lycorptech_jp
PRO
0
260
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Navigating Team Friction
lara
183
15k
RailsConf 2023
tenderlove
29
1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
GraphQLとの向き合い方2022年版
quramy
44
13k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Speed Design
sergeychernyshev
27
800
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Transcript
Boxes and whiskers — generated by Stable Diffusion XL v1.0
2024 2 R (WBS) 2024 2 R — 2024-11 – p.1/22
https://speakerdeck.com/ks91/collections/corporate-data-analysis-2024-winter 2024 2 R — 2024-11 – p.2/22
( 20 ) 1 • 2 R • 3 4
5 6 ( ) 7 (1) 8 (2) 9 R ( ) (1) 10 R ( ) (2) 11 R ( ) (1) 12 R ( ) (2) 13 GPT-4 14 GPT-4 15 ( ) LaTeX Overleaf 8 (12/16 ) / (2 ) OK / 2024 2 R — 2024-11 – p.3/22
R ( ) ( 8 ) : GPL (GNU General
Public License) 2024 2 R — 2024-11 – p.4/22
GNU General Public License (GPL) GNU ( ) GNU’s Not
Unix . . . GNU GPL GNU ( ) 0: ( ) 1: ↑ 2: 3: 4 → (copyleft) 4 copyleft R 2024 2 R — 2024-11 – p.5/22
RStudio R Python (IDE) GPL . . . ( :
^^;) R RStudio ( ) RStudio Desktop ↑ . . . 2024 2 R — 2024-11 – p.6/22
R RStudio R Windows macOS — — Linux (Ubuntu) GPL
( ) ↑ 2024 2 R — 2024-11 – p.7/22
Windows Windows 11 ARM (macOS ) (Intel ) ARM :
Arm Ltd. mac SoC (System on a Chip) (M1∼M4) Intel : Intel 2024 2 R — 2024-11 – p.8/22
R (Windows ) . . . https://www.r-project.org/ “download R” OS
R Windows ( ) OK 2024 2 R — 2024-11 – p.9/22
RStudio Desktop (Windows ) . . . https://posit.co/download/rstudio-desktop/ “2: Install
RStudio” OS RStudio “1: Install R” R ← RStudio . . . Windows ( ) OK RStudio Choose R Installation → default 64-bit version of R OK crash reports → 2024 2 R — 2024-11 – p.10/22
Console ‘> ’ 1 > x <- c(1, 2, 3,
4, 5) # X > y <- c(5, 4, 3, 2, 1) # Y > plot(x, y) # > plot(x, y, xlim=c(0, 6), ylim=c(0, 6)) # > m <- lm(y ~ x) # x y > m # > abline(m) # ‘> ’ # R ‘<-’ ‘c( . . . )’ combine ‘xlim’ ‘ylim’ ‘lm( . . . )’ linear model ( ) ‘A ∼ B’ B A ‘abline( . . . )’ 2024 2 R — 2024-11 – p.11/22
macOS macOS Ventura 13.6.1 ( Sequoia 15.1.1 ) Apple (ARM)
Apple : M1∼M4 2024 2 R — 2024-11 – p.12/22
R (macOS ) . . . https://www.r-project.org/ “download R” OS
R macOS OK 2024 2 R — 2024-11 – p.13/22
RStudio Desktop (macOS ) . . . https://posit.co/download/rstudio-desktop/ “2: Install
RStudio” OS RStudio “1: Install R” R ← RStudio . . . macOS RStudio 2024 2 R — 2024-11 – p.14/22
p.11 ‘Plots’ ‘Export’ ‘Save as Image...’ EPS (Encapsulated PostScript) EPS
L ATEX EPS macOS Skim PDF Windows (macOS ) PowerPoint (↑) . . . PDF PDF 2024 2 R — 2024-11 – p.15/22
Linux RStudio Desktop 2024 2 R — 2024-11 – p.16/22
Linux (Ubuntu) Ubuntu 22.04 ( Ubuntu 24.04 ) ARM (macOS
) ARM (binary) : 2 (source) : ( ) (build) : 2024 2 R — 2024-11 – p.17/22
R (Ubuntu ) (1/2) . . . https://www.r-project.org/ “download R”
“Source Code for all Platforms” “∼.tar.gz” unzip tar https://docs.posit.co/resources/install-r-source/ $ sudo sed -i.bak "/^#.*deb-src.*universe$/s/^# //g" /etc/apt/sources.list $ sudo apt update $ sudo apt build-dep r-base $ export R_VERSION=4.3.2 2024 2 R — 2024-11 – p.18/22
R (Ubuntu ) (2/2) https://docs.posit.co/resources/install-r-source/ (tar ) $ ./configure \
--prefix=/opt/R/${R_VERSION} \ --enable-R-shlib \ --enable-memory-profiling \ --with-blas \ --with-lapack $ make $ sudo make install $ sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R $ sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript 2024 2 R — 2024-11 – p.19/22
RStudio Desktop (Ubuntu ) ( ) https://dailies.rstudio.com/rstudio/cherry-blossom/electron/jammy-arm64/ .deb (Ubuntu 24.04
) https://dailies.rstudio.com/rstudio/cranberry-hibiscus/electron/noble-arm64/ $ sudo apt install ./ 2024 2 R — 2024-11 – p.20/22
p.11 2024 2 R — 2024-11 – p.21/22
2024 2 R — 2024-11 – p.22/22