Chapter 1. Introduction to R
In this chapter, we will be discussing basic R concepts. This will serve as the background for upcoming chapters. We are not going to discuss each and every concept in detail for R. This chapter is meant for people who do not have any knowledge of the R language or beginners who are looking to pursue a career in quantitative finance or want to use R for quantitative financial analysis. This chapter can give you a start in learning how to write programs in R, and for writing complex programs, you can explore other books.
This chapter covers the following topics:
- The need for R
- How to download/install R
- How to install packages
- Data types
- Import and export of different data types
- How to write code expressions
- Functions
- How to execute R programs
- Loops (for, while, if, and if...else)