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
データ分析者のためのRStudio活用術 / pyrintegration
Search
Uryu Shinya
October 26, 2019
Programming
3
4.8k
データ分析者のためのRStudio活用術 / pyrintegration
Tokyo.R #82 発表資料(デモンストレーションのスライドなし)
Uryu Shinya
October 26, 2019
Tweet
Share
More Decks by Uryu Shinya
See All by Uryu Shinya
Rの機械学習フレームワークの紹介〜tidymodelsを中心に〜 / machine_learning_with_r2024
s_uryu
0
690
地理空間データの機械学習への適用 / machine_learning_for_spatial_data
s_uryu
0
170
mandaRa: R言語ユーザのための新しい知識共有の場 / mandara_tokyor111
s_uryu
2
600
R言語入門 (R-4.3.3 2024年4月版) / introduction to r
s_uryu
8
6.1k
統・再現性・協力: 人為的過誤を防ぎ、未来へ進む策 / Integration, Reproducible, and Collaboration
s_uryu
1
680
Rによる大規模データの処理
s_uryu
2
2.4k
textlintr: Rユーザのためのtextlintによる校正
s_uryu
0
510
Rによるデータ可視化と地図表現
s_uryu
1
2.2k
データ分析入門 / tokupon-ds2022
s_uryu
4
5.6k
Other Decks in Programming
See All in Programming
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
950
CSC509 Lecture 11
javiergs
PRO
0
180
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
Micro Frontends Unmasked Opportunities, Challenges, Alternatives
manfredsteyer
PRO
0
100
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
flutterkaigi_2024.pdf
kyoheig3
0
140
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
230
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
690
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
133
8.9k
How to train your dragon (web standard)
notwaldorf
88
5.7k
It's Worth the Effort
3n
183
27k
A Tale of Four Properties
chriscoyier
156
23k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Rails Girls Zürich Keynote
gr2m
94
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
The Language of Interfaces
destraynor
154
24k
Transcript
σʔλੳऀͷͨΊͷ 34UVEJP׆༻ज़ Uryu Shinya @u_ribo 5PLZP3
ਅͷʮσʔλੳऀʯ Ͳ͜ʹ͍Δʁ https://twitter.com/sinhrks/status/820237538098958336
34UVEJP*%& ʮ3ͷಋೖͱ34UVEJPࣄ࢝Ί վగ൛ ʯΑΓҾ༻ https://www.slideshare.net/TakashiYamane1/rrstudio/11 W ݄ͷϦϦʔε W EBJMZCVJMETͰW
W 3ϢʔβͷͨΊͷ34UVEJP࣮ફೖ দଜ΄͔ ݄
1ZUIPO 42-࿈ܞػೳͷڧԽ ύωϧͷਐԽʜ$POOFDUJPOT 5FSNJOBM +PCT https://rstudio.com/products/rstudio/release-notes/ WdWͰͷओͳػೳมߋ NBUQMPUMJCͰͷ࡞ਤ͕QMPUύωϧʹදࣔ͞ΕΔΑ͏ʹ 3 1ZUIPOؒͰͷΦϒδΣΫτڞ༗͕؆қʹ
SFUJDVMBUFύοέʔδ 4UBOͷཪͰ3Λճ͢https://dastatis.github.io/pdf/StanAdvent2018/IntroJobsPane.html KPCTύωϧͰͷόοΫάϥϯυ࣮ߦ :PVEPOPUIBWFUPXBJUVOUJMQSPDFTTJOHJTDPNQMFUFhttps://kazutan.github.io/tokyoR71/kazutan_tokyor71.html#1
WdWͰͷओͳػೳมߋ ຊޠೖྗڥͷվળʢʁʣ ςʔϚɺڥઃఆ 34UVEJPؔ࿈νʔϜʹΑΔύοέʔδͷਐԽɺίϛϡχςΟαϙʔτ SMJC STUVEJPFEVDBUJPO TPMFOH SUFOTPSqPX
34UVEJPʮྗ͕ཉ͍͔͠ʜʯ ˞ݸਓͷໝͰ͢ ͱ ͲͪΒ͍͜ͳͤΔ ʮୡਓʯΛࢦͦ͏
σʔλੳͰͷڞ௨՝ʜ σʔλڞ༗ ύοέʔδཧ ͷΛఏڙ͠·͢ʂ ৽͍͠34UVEJPɺ ύοέʔδΛͬͨ
հ͢ΔػೳͷҰ෦ ։ൃதͷͷͰ͢ɻ কདྷͷ࣮ʹ͓͍ͯ มߋ͞ΕΔՄೳੑ͕͋Γ·͢ɻ ͓͜ͱΘΓ v1.3 ˢWࡌ༧ఆͷػೳ ΞΠίϯͰࣔ͠·͢
Project Environments CRAN: v0.8.0 rstudio/renv env
3ύοέʔδͷอଘઌ 3ͷϚΠφʔόʔδϣϯ FHW W ͝ͱʹҰͭ tidyr 1.0.0 tidyr 1.0.0.9000 tidyr
0.8.3 ෳͷόʔδϣϯΛϓϩδΣΫτ͝ͱʹΓସ͑Ͱ͖ͳ͍ ύοέʔδͷґଘؔʹΑΔӨڹΛड͚Δ .libPaths() [1] "/usr/local/lib/R/3.6/site-library" [2] "/usr/local/Cellar/r/3.6.1_1/lib/R/library"
3ύοέʔδͷอଘઌ tidyr 1.0.0 3ͷϚΠφʔόʔδϣϯ FHW W ͝ͱʹҰͭ tidyr 1.0.0.9000 tidyr
0.8.3 ෳͷόʔδϣϯΛϓϩδΣΫτ͝ͱʹΓସ͑Ͱ͖ͳ͍ ύοέʔδͷґଘؔʹΑΔӨڹΛड͚Δ .libPaths() [1] "/usr/local/lib/R/3.6/site-library" [2] "/usr/local/Cellar/r/3.6.1_1/lib/R/library"
SFOWΛར༻͢Δ RϓϩδΣΫτͰύοέʔδ͕ཧ͞ΕΔ OS, ϚΠφʔόʔδϣϯͰͷࡉ ඪ४ύοέʔδΠϯετʔϧઌͷγϯϘϦοΫϦϯΫ .libPaths() [1] "/Users/uri/Documents/slides/talk_191026_tokyor82/renv/ library/R-3.6/x86_64-apple-darwin18.6.0" [2]
"/private/var/folders/ty/j83j79pj6_s97qx4vlylnzzw0000gn/T/ RtmphSKMRs/renv-system-library" tidyr 1.0.0 tidyr 1.0.0.9000 tidyr 0.8.3 ϓϩδΣΫτʹ ࣮ମ͕͋Δ
File —> New Project… طଘϓϩδΣΫτͰͷར༻ SFOWΛར༻͢Δ v1.3 renv ::init() 1BDLBHFཧͷύωϧ͕SFOW༷ʹ
SFOWཧղͷͨΊͷཁ Isolated Portable Reproducible ϓϩδΣΫτ୯ҐͰͷύοέʔδґଘঢ়ଶɺ (JUίϛοτཤྺʹجͮ͘ঢ়ଶͷ෮ݩ ར༻͢ΔύοέʔδΛهͨ͠MPDLϑΝΠϧ +40/ ΛΓͱΓ͢Δ͚ͩ ϓϩδΣΫτ͝ͱʹར༻ύοέʔδɺόʔδϣϯΛ
Γସ͑ΒΕΔɺΩϟογϡͷར༻ʹΑΔޮԽ લతͳҐஔ͚ͷQBDLBSBUύοέʔδ͔Βͷվળ͕ओ
SFOWཧղͷͨΊͷཁ ʮSFOWʹΑΔύοέʔδཧʯΑΓҾ༻ https://speakerdeck.com/black_tank_top/renv-version-control?slide=13
SFOWཧղͷͨΊͷཁ snapshot() init() restore() ه ෮ݩ install() status() renv.lock renv.lock
3ຊମͷόʔδϣϯΞοϓʹ Ҿ͖ଓ͖ཹҙ͕ඞཁ ύοέʔδ͕ґଘ͢ΔγεςϜ͕ ݪҼͰͭ·ͮ͘ՄೳੑΔ ҙ ʜΑΓݎ࿚ͳ࠶ݱੑڥΛٻΊΔͳΒʁ /&95
%PDLFSڥதͰͷར༻ %PDLFSpMFͷཧ खಈͰͷՃɾআɾมߋ ͕ෆཁ %PDLFSϗετͱίϯςφؒͰ ύοέʔδ͕ἧ͏ 3ຊମͷόʔδϣϯΛݻఆ
ඞཁͳύοέʔδΛඞཁͳ࣌ʹ ·ͩෆ҆ఆͳ෦ɻ ϑΟʔυόοΫ͠Α͏˙ ˙ $3"/ϦϦʔεͪ˙ SFOW·ͱΊ
Pin, Discover and Share Resources CRAN: v0.2.0 rstudio/pins pins
Σϒ্σʔλιʔεͷଟ༷Խ ಡΈࠐΈํ๏ෳࡶ ͰࡁΉͷ download.file() 3ύοέʔδΛ͏ͷ "1*Λܦ༝͢Δͷ ͱ ؒͰͷڞ༗ߟྀ͍ͨ͠ ςʔϒϧҎ֎ͷΦϒδΣΫτඞཁ ΦϑϥΠϯͰࢀর͍ͨ͠ʜ
σʔλڞ༗Λָʹ͢Δ σʔλͷڞ༗ઌʢϘʔυʣ 3ύοέʔδ͓Αͼ 1ZUIPOϥΠϒϥϦͱͯ͠ఏڙ Local 3 GitHub Kaggle RStudio Connect
QJOTཧղͷͨΊͷཁ ରͷϘʔυΛࢦఆ board_register(board = ) σʔλΛ୳͢ pin_find(text = , board
= ) pin(board = ) pin_get(name = ,board = ) ొ ࢀর pins.board_register(board =) pins.pin_get(name = , board =)
34UVEJP͔Βͷૢ࡞ v1.3 v1.2͔ΒͰྑ͍͔ connection ΞυΠϯ
ࠓޙՃ͞ΕΔ༧ఆͷϘʔυ ౷Ұ͞Εͨ ΠϯλʔϑΣʔε Ͱศར
Interface to 'Python' CRAN: v1.1.3 rstudio/reticulate reticulate
34UVEJPͰ1ZUIPOΛ࣮ߦ λʔϛφϧ͔Βͷ࣮ߦ R MarkdownͷΤϯδϯࢦఆ reticulate ::repl_python() renvڥͰPythonڥΛར༻ (conda, virtualenv)… requirements.txt,
environment.yml ߹Θͤͯཧ
ENJOY