FAQs
About R syntax and RStudio
- use of = vs <- as assignment operator
- other questions on code requirements vs. code conventions are usually explained in the R style guide or Tidyverse style guide
- You can view additional tips on using RStudio effectively by going to
Help -> Cheetsheets -> RStudio IDE cheat sheet
.
This PDF includes an overview of each of the things you see in RStudio,
as well as explanations of how you can use them.
- Objects in R are referred to as variables in other programming languages.
We’ll use these terms synonymously for this course,
though in other contexts there may be differences between them.
Please see the R documentation on objects
for more information.
- Are there restrictions on what you can name objects?
The name you assign to objects can be arbitrary,
but we recommend using names that are relatively short and meaningful
in the context of the values they represent.
It’s useful to also know other general limitations on object names:
- case sensitive
- cannot start with numbers
- avoid other common words in R (e.g., function names, like
mean
)
- avoid dots (underscores are a good alternative, such as the example above)
- Dealing with dates:
About Tidyverse
Where can I learn more?
- Data Carpentry’s Intro to R and RStudio has another series of instructions for overviewing RStudio
- R for Data Science: book on tidyverse data science (there’s a community around it, too!)
- TidyTuesday is a weekly podcast and data analysis activity associated with the R for Data Science Community
- TidyX is a video blog that talks about Tidy Tuesday activities and walks through code