4 分析環境のカスタマイズ
4.1 .Rprofileの設定
4.2 RStudioのカスタマイズ
以下の設定はRStudio 2022.02.0+442 (Prairie Trillium)の設定
- Tools > Global Options
- General
- Basicタブ
- Restore .RData into workspace at startupのチェックを消す。
- Save workspace to .RData on exit:をNeverに変更する。
- Always save history (even when not saving .RData)のチェックを消す。
- Basicタブ
- Code
- Editingタブ
- Insert spaces for tabのチェックを付ける。
- Tab widthは2か4
- Auto-detect code indentationのチェックを付ける。
- Insert matching parens/quotesのチェックを付ける。
- Auto-indent code after pasteのチェックを付ける。
- Vertically align arguments in auto-indentのチェックを付ける。
- Always save R scripts before sourcingのチェックを付ける。
- Ctrl + Return executes:をMulti-line R statementに変更する。
- Insert spaces for tabのチェックを付ける。
- Displayタブ
- Highlight selected wordのチェックを付ける。
- Highlight selected lineのチェックを付ける。
- Show line numbersのチェックを付ける。
- Show syntax highlighting in console inputのチェックを付ける。
- Highlight R function callsのチェックを付ける。
- Rainbow parenthesesのチェックを付ける。
- Savingタブ
- Default text encoding:のChangeをクリックし、UTF-8を選択する。
- Completionタブ
- Show code completion:をAutomaticallyに変更する。
- Allow automatic completions in consoleのチェックを付ける。
- Insert parentheses after function completionsのチェックを付ける。
- Show help tooltip after function completionsのチェックを付ける。
- Insert spaces around equals for argument completionsのチェックを付ける。
- Use tab for autocompletionのチェックを付ける。
- Editingタブ
- Appearance
- 自分の好みのものを選択する。
- Pane Layout
- 左上: Source
- 右上: Console
- 左下: 全てチェックを消す。
- 左下: 全てチェックを付ける。
- R Markdown
- Basicタブ
- Show output inline for all R Markdown documentsのチェックを消す。
- Basicタブ
- 左下のApplyをクリック
私たちのR - 4 分析環境のカスタマイズ 私たちのR: ベストプラクティスの探求 私たちのR: ベストプラクティスの探求 私たちのR