course content

Course Content

R Introduction: Part I


Using variables can streamline the process of working with data by allowing for clear, concise, and efficient calculations. Now, let's apply our variables to a practical example.


Moving forward with the exercise from the previous chapter, we can compute the projected revenue over a 4-year period exclusively using variables. Here's how:

  1. To determine the anticipated revenue after 4 years, utilize the variables initial_money, interest_rate, and n_years. Store the outcome in the variable revenue.
  2. Present the calculated revenue value in this specific format:

The formula for revenue will be: initial_money * (1 + interest_rate / 100) ^ n_years.

Everything was clear?

Section 1. Chapter 8
toggle bottom row