R – Reference environment & settings commands
A list of commands I have used in R for information about the environment or general settings.
- Version info: R.Version()
- Clear the terminal console: cat(“\014”) – In effect, this sends the ‘Ctrl L‘ keystroke to the console
- Workspace info:
- Show the current workspace: getwd()
- Set the workspace to use: setwd(‘folder path goes here…’)
- Note: When copying and pasting in Windows, the backslash operates as an escape character in R. This can be avoided by using: r”(path)”
eg. setwd( r”(C:\documents\Data Analysis\R Prog & Data Sci)” )