- 14 Videos
- 62 Exercises
- 4 hours
- 2,785 Participants
- 5300 XP

**Instructor(s):**

Lore is a data scientist at DataCamp. She obtained her PhD in Business Economics and Statistics at KU Leuven, Belgium. During her PhD, she collaborated with several banks working on advanced methods for the analysis of credit risk data. At DataCamp, she is in charge of building out the Applied Finance curriculum.

Davis Vaughan

Learning R can be intimidating, especially without concrete examples you might see in the real world. In this finance oriented introduction to R, you will learn essential data structures such as lists and data frames and have the chance to apply that knowledge directly to financial examples. By the end of the course, you will feel comfortable with the basics of manipulating your data to perform financial analysis in R.

Welcome! Let's get comfortable with the very basics of R, and learn how to use it as a calculator. You will also create your first variables in R and explore some of the base data types such as numerics and characters.

- Welcome to Introduction to R for Finance! 50 xp
- Your first R script 100 xp
- Arithmetic in R (1) 100 xp
- Arithmetic in R (2) 50 xp
- Assignment and variables (1) 100 xp
- Assignment and variables (2) 100 xp
- Financial returns 50 xp
- Financial returns (1) 100 xp
- Financial returns (2) 100 xp
- Basic data types 50 xp
- Data type exploration 100 xp
- What's that data type? 50 xp

In this chapter, you will learn all about vectors and matrices, using historical stock prices for companies like Apple and IBM as examples. After all of this, you will feel confident about creating, naming, manipulating, and selecting from vectors and matrices!

Arguably the most important data structure in R, the data frame is what most of your data will be in the form of. Combining the structure of a matrix with the flexibility of having different types of data in each column, you will soon see that the data frame is a powerful tool indeed! Good luck!

Are you a male or female? On a scale of 1-10, how are you feeling? These are questions with answers that fall into a limited number of categories. These types of data can be classified as factors. In this chapter, you will use bond credit ratings to learn all about creating, ordering, and subsetting factors!

Think about your grocery list for a second. Apples, pizza, milk, and whatever else you might have on there. These are very different items right? Wouldn't it be nice if there was a way to hold related vectors, matrices, or data frames together in R? Enter, the list! In this final chapter, you will explore lists and many of their interesting features by building a small portfolio of stocks, and even come to realize that you have seen some of this already!