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-Tips
Search
bob3bob3
April 22, 2023
Science
570
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
シン・初心者のためのR-Tips
本当の初心者がRを学ぶ上で細かいんだけど躓きがちないくつかの事柄。
bob3bob3
April 22, 2023
More Decks by bob3bob3
See All by bob3bob3
RとLLMで自然言語処理
bob3bob3
3
1.1k
RでPSM分析
bob3bob3
1
490
Rでコンジョイント分析 2024年版
bob3bob3
0
2.8k
『改訂新版前処理大全』の話と Apache Parquet の話 #TokyoR
bob3bob3
0
1.5k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
670
『データ可視化学入門』をPythonからRに翻訳した話(増強版)
bob3bob3
0
620
『データ可視化学入門』を PythonからRに翻訳した話
bob3bob3
1
680
qeMLパッケージの紹介
bob3bob3
0
3k
「国と音楽」 ~spotifyrを用いて~ #muana
bob3bob3
2
680
Other Decks in Science
See All in Science
東北地方における過去20年間の降水量の変化
naokimuroki
1
500
データベース14: B+木 & ハッシュ索引
trycycle
PRO
0
920
Inside the Mind of an LLM
baggiponte
0
330
ハミルトン・ヤコビ方程式の解の性質と物理的意味
enakai00
0
910
How a camera trap data standard enabled an ecosystem of interoperable tools
peterdesmet
0
130
SAT ソルバーの仕組みと制約ソルバーへの応用
tsoh
3
410
Visual Linear Algebra - Lecture at Shosen Grande
hiranabe
0
520
生成AI・プレプリント時代における 研究成果公開の再設計 ― トップカンファレンス文化はどこへ向かうのか / Redesigning the Dissemination of Research Outputs in the Age of Generative AI and Preprints — Where Is the Top-Conference Culture Heading?
ykiyota
0
30k
生成AIと司法書士の未来.pdf
tagtag
PRO
0
180
CVPR2026_VGGTとその仲間たち
mickey_0226
0
1.1k
From Prediction to Understanding: Causal Discovery for Data Science and AI Applications
sshimizu2006
0
300
Conwayの法則を"ちゃんと"使うために — 原典でConwayは何を言っていたのか
bonotake
10
7.2k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
Practical Orchestrator
shlominoach
192
12k
Exploring anti-patterns in Rails
aemeredith
4
510
Speed Design
sergeychernyshev
33
2.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
530
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
WCS-LA-2024
lcolladotor
0
830
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Transcript
シン・初心者 のためのR-tips @bob3bob3 Tokyo.R #105 2023/04/22
大文字と小文字は別物 ExcelやGoogleスプレッドシートの関数だと「=average(A1:A5)」も「=Average(A1:A5)」 も「=AVERAGE(A1:A5)」も同じ結果を返すが、Rでは大文字と小文字を区別するのでエ ラーになります。
大文字と小文字は別物 ExcelやGoogleスプレッドシートの関数だと「=average(A1:A5)」も「=Average(A1:A5)」 も「=AVERAGE(A1:A5)」も同じ結果を返すが、Rでは大文字と小文字を区別するのでエ ラーになります。
「%>%」と「|>」は、ほぼ同じ • どちらもパイプ演算子と呼ばれるもので、初心者のうちは同じものと思っておいて大 丈夫です。 • 覚えておいた方が良い違いは、「|>」は特に準備なしで使えるが、「%>%」の方は事 前に「library(purrr)」もしくは「library(tidyverse)」として必要なパッケー ジを呼び出しておく必要があること。 • 詳しく知りたい場合は以下の記事を参照してください。
◦ R 4.2.0のリリースでにわかに盛り上がる Base Pipe “|>” とは何なのか? %>%との違いを調べまし た
ググる前にHELP! • 関数のヘルプページをしっかり読み込みましょう。ググる前にヘルプページを読み ましょう。上級者ほどしっかりヘルプページを読んでいます。ほとんどの答えはヘル プページに載っています。 • ヘルプページはhelp(関数名)もしくは?関数名で表示されます。 • 記号のヘルプは記号をダブルクォーテーションでくくって、help("記号")もしくは?" 記号"で表示されます。
因子型 • Rで扱うデータの変数に型があります。実数(numeric)、文字列(character)、因子 (factor)などの型があり、型に合わない情報は変数に入れることができません。 • Rで特徴的なのが因子型です。名義尺度、順序尺度に相当するのが因子型です。
因子型 年度が実数型なのでなんか 変なことになってる。
因子型 年度を因子型にすると期待通りの表 示になる。
チートシート • チートシートとは「早見表」「あんちょ こ」「カンニングペーパー」ぐらいの 意味。 • RStudioのメニューのHelp→Cheat Sheetsから色々なチートシート (pdf)が見られます。
チートシート dplyrとggplot2のチートシートは印刷して手元に置いておくといいです。
15分悩んで解決しなかったらr-wakalangで相談 • r-wakalangは有志で運営しているRのわからないことを質問したり雑談したりする Slackです。 • https://github.com/tokyor/r-wakalang • #r_beginners ◦ 初心者のためのチャンネルです。なんでも気軽に質問してみましょう。
Enjoy! • 大文字と小文字は別物です • 「%>%」と「|>」は、ほぼ同じ • ググる前にHELP! • 因子型 •
チートシート • 15分悩んで解決しなかったらr-wakalangで相談 • 去年発表した「Rを学ぶのは難しい」も参考になると 思うので良かったら見てね。