Module 3 Data Structures Introduction
Although R seems intimidating at first, requiring what seems to be programming skills, this belies that most of the procedures for complex predictive analytics can in fact be distilled into simple procedures. It is most certainly not correct that R need be viewed upon as a programming language.
There are certain basic principles that need to be understood however and as covered in Module 1, Module 2 sets out to emphasise these principles.
In this module, Data Structures, available to R, will be explored. The exercise will require a new script to have been opened in RStudio as will have become familiar in procedures set forth in Module 1:
Table of contents
- Slides
- Procedure 1: Create a Vector with c Function
- Procedure 2: Perform Vector Arithmetic
- Procedure 3: Create Vector via a Sequence
- Procedure 4: Create a Vector via Repetition
- Procedure 5: Selecting and Filtering from a numeric Vector
- Procedure 6: Setting Vector Labels or Names
- Procedure 7: Selecting and Filtering from a Character Vector
- Procedure 8: Combine Vectors to make a Matrix with cbind
- Procedure 9: Viewing a Matrix
- Procedure 10: Combine Vectors to make a Matrix with rbind
- Procedure 11: Create a Matrix of defined size with a Vector
- Procedure 12: Labelling a Matrix
- Procedure 13: Selecting from a Matrix
- Procedure 14: Creating a Factor from a Vector
- Procedure 15: Creating a Factor from a Vector with Levels and Ordering
- Procedure 16: Creating a list with a variety of objects
- Procedure 17: Subsetting and referencing objects with a name
- Procedure 18: Create a Data Frame from Vectors
- Procedure 19: Create a Data Frame from Names and stringsAsFactors
- Procedure 20: Saving .Rdata to file
- Procedure 21: Loading .Rdata from file