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
560
Rでコンジョイント分析 2024年版
bob3bob3
0
2.9k
『改訂新版前処理大全』の話と Apache Parquet の話 #TokyoR
bob3bob3
0
1.5k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
670
『データ可視化学入門』をPythonからRに翻訳した話(増強版)
bob3bob3
0
630
『データ可視化学入門』を PythonからRに翻訳した話
bob3bob3
1
690
qeMLパッケージの紹介
bob3bob3
0
3k
「国と音楽」 ~spotifyrを用いて~ #muana
bob3bob3
2
700
Other Decks in Science
See All in Science
「念のためのログ保存」を組織全体でやめるためのポリシーと仕組み作り
i2tsuki
4
410
HOLO: Homography-Guided Pose Estimator Network for Fine-Grained Visual Localization on SD Maps
tomoaki0705
0
170
明治薬科大学講義_ビッグデータ解析を支えるデータベース技術とクラウドコンピューティング
ktatsuya
1
200
[Webinaire InnOvin] Coup de Chaud : Comment préserver la santé des animaux
institutdelelevage
PRO
0
230
Webinaire : Valorisez les résultats de vos projets européens avec EU-FarmBook
institutdelelevage
PRO
0
180
Understanding CVP Waveforms: Interpretation and Clinical Implications in Anesthesiology
taka88
0
970
[Webinaire presse] Sécheresse 2026 : quelles conséquences techniques en élevage de ruminants et quels leviers d'action ?
institutdelelevage
PRO
0
300
言葉をはかる:テキストマイニング入門①講義編
satocos135
0
270
データベース02: データベースの概念
trycycle
PRO
2
1.4k
Massey Ratings for Match Outcome Prediction in Table Tennis: Evidence of Greater Stability than the ITTF World Ranking
konakalab
0
170
知能とはなにか -ヒトとAIのあいだ-
tagtag
PRO
0
230
Collective Predictive Coding Hypothesis: Emergence of Language and Cooperative Behaviors
tanichu
0
170
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Rails Girls Zürich Keynote
gr2m
96
14k
Claude Code のすすめ
schroneko
67
230k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
550
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
The Curious Case for Waylosing
cassininazir
1
570
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
We Have a Design System, Now What?
morganepeng
55
8.4k
エンジニアに許された特別な時間の終わり
watany
109
250k
Six Lessons from altMBA
skipperchong
29
4.5k
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を学ぶのは難しい」も参考になると 思うので良かったら見てね。