Key Points
-
R is a programming language and software used to run
commands in that language
-
RStudio is software to make it easier to write and run
code in R
- Use
R Projects to keep your work organized and
self-contained
- Write your code in scripts for reproducibility and portability
- Use
install.packages() to install packages
(libraries)
- Use
library() to load packages
-
R Markdown is a useful language for creating
reproducible documents combining text and executable R
code
- Specify chunk options to control formatting of the output
document
- Use
read_csv to read tabular data in
R.
- Use
factors to represent categorical data in
R.
- Use the
dplyr package to manipulate dataframes.
- Use
select() to choose variables from a dataframe.
- Use
filter() to choose data based on values.
- Use
group_by() and summarize() to work
with subsets of data.
- Use
mutate() to create new variables.
- Use the
tidyr package to change the layout of data
frames.
- Use
pivot_wider() to go from long to wide format.
- Use
pivot_longer() to go from wide to long format.