Learning objectives:
- To gain familiarity with the various panes in the RStudio IDE
- To gain familiarity with the buttons, short cuts and options in the Rstudio IDE
- To understand variables and how to assign to them
- To be able to manage your workspace in an interactive R session
- To be able to use mathematical and comparison operations
- To be able to call functions
Section headings:
-
Introduction to RStudio
- includes layout info -- screenshot?
-
Work flow within Rstudio
- 2 workflows.
-
Introduction to R
-
Using R as a calculator
-
Mathematical functions
-
Comparing things
-
Variables and assignment
-
Managing your environment
-
Introduction
-
A possible solution
-
Best practices for project organisation
-
Treat data as read only
-
Data Cleaning
-
Treat generated output as disposable
-
Separate function definition and application
-
Save the data in the data directory
-
Version Control
-
Reading Help files
-
Special Operators
-
Getting help on packages
-
When you kind of remember the function
-
When you have no idea where to begin
-
When your code doesn't work: seeking help from your peers
-
Other ports of call
-
Data Types
-
Data Structures
-
Vectors
-
Matrices
-
Factors
-
Lists
-
Data frames
-
Reading in data
-
Using dataframes: the
gapminder
dataset
-
Accessing elements using their indices
-
Skipping and removing elements
-
Subsetting by name
-
Subsetting through other logical operations
-
Handling special values
-
Factor subsetting
-
Matrix subsetting
-
List subsetting
-
Data frames
-
Defining a function
-
Combining functions
-
Layers
-
Transformations and statistics
-
Multi-panel figures
-
Modifying text
-
conditional logic
-
control flow
-
Saving plots
-
Writing data
-
Best practices for writing nice code
-
Make code readable
-
Documentation: tell us what and why, not how
-
Keep your code modular
-
Break down problem into bite size pieces
-
Know that your code is doing the right thing
-
Don't repeat yourself
-
Remember to be stylish