Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
R をインストールする / Installing R
Search
Kenji Saito
PRO
November 28, 2024
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
R をインストールする / Installing R
早稲田大学大学院経営管理研究科「企業データ分析」2024 冬のオンデマンド教材 第2回で使用したスライドです。
Kenji Saito
PRO
November 28, 2024
Transcript
22 slides
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
More Decks by Kenji Saito
See All by Kenji Saito
FinTech 13-14 : FinTech Ideathon, Presentations and Conclusions
ks91
PRO
0
14
ミッション / Mission
ks91
PRO
0
14
リーダーシップ / Leadership
ks91
PRO
0
9
NPO とは何か(を考えるワールドカフェ) / What Is an NPO? (A World Café Discussion)
ks91
PRO
0
30
講師自己紹介 / Lecturer's Self-Introduction
ks91
PRO
0
27
講師研究紹介 / Faculty Research Profile
ks91
PRO
0
23
FinTech 11-12 : Cyber-Physical Society and Future of Finance
ks91
PRO
0
68
サイバーフィジカル・セキュリティーと人間の安全保障 / Cyber-Physical Security and Human Security
ks91
PRO
0
38
ゼミ紹介 デジタルトランスフォーメーションと経済・金融の未来 / Zemi Introduction : Digital Transformation and the Future of the Economy and Finance
ks91
PRO
0
42
Other Decks in Technology
See All in Technology
常時稼働エージェントの作り方(Claude公式ブログを資料化)
minorun365
PRO
17
28k
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
250
AWS Client VPNの設定でハマったポイントとその過程での気づき
amarelo_n24
1
420
マネージャーをエスパーにしない マネジメントされる側から始める、働きやすい現場づくり
comi190327
1
830
Kubernetes, Agones, WebRTC, GPU で作る クラウドゲーミング基盤を本番運用に乗せるまで
vivion
0
170
変更差分を読むために環境を整備しよう
pipepasta
1
480
Gov-JAWS#9 統合監視機能のマネージドサービス化+AIによる障害時自動調査
fj_yoshimura_kosuke
0
220
re:Inventを楽しむために、 1日1つ「これが楽しみ」を決めよう
beli68
0
120
kubellの最新データ分析環境
kubell_hr
1
180
エンタープライズ事業未経験のデータ屋、 AI時代にN回撃沈する.pdf
ryoskdara_
0
160
おうち環境でも「なるべく止めたくない!」 ― おうち環境の機器冗長化の理想と現実
yuutosi
1
610
Terraform 0 to 100:100個以上のリポジトリを常に最新にし続けるための自動化
sue445
2
1.1k
Featured
See All Featured
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
350
Game over? The fight for quality and originality in the time of robots
wayneb77
1
340
Google's AI Overviews - The New Search
badams
0
1.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Making the Leap to Tech Lead
cromwellryan
135
10k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
640
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Building Adaptive Systems
keathley
44
3.3k
A designer walks into a library…
pauljervisheath
211
25k