Earned Value Management (EVM) is a project management technique used to measure project performance and progress in an objective manner. It integrates project scope, time (schedule), and cost parameters to provide accurate forecasts of project performance issues.

Here are the key components and common equations used in EVM:

**Planned Value (PV):**The authorized budget assigned to scheduled work.**Earned Value (EV):**The value of work actually performed expressed in terms of the approved budget for that work.**Actual Cost (AC):**The actual cost incurred for the work performed on an activity during a specific time period.**Budget at Completion (BAC):**The total budget for the project.

**Cost Variance (CV):**\[CV = EV - AC\]

- Positive CV indicates under budget.
- Negative CV indicates over budget.

**Schedule Variance (SV):**\[SV = EV - PV\]

- Positive SV indicates ahead of schedule.
- Negative SV indicates behind schedule.

**Cost Performance Index (CPI):**\[CPI = \frac{EV}{AC}\]

- CPI > 1 indicates cost efficiency.
- CPI < 1 indicates cost inefficiency.

**Schedule Performance Index (SPI):**\[SPI = \frac{EV}{PV}\]

- SPI > 1 indicates schedule efficiency.
- SPI < 1 indicates schedule inefficiency.

First, load the package:

Then set the BAC, schedule, and current time period for a toy project.

Calculate the PV and print the results:

```
pv <- pv(bac, schedule, time_period)
cat("Planned Value (PV):", pv, "\n")
#> Planned Value (PV): 40000
```

Set the actual % complete and calculate the EV:

```
actual_per_complete <- 0.35
ev <- ev(bac, actual_per_complete)
cat("Earned Value (EV):", ev, "\n")
#> Earned Value (EV): 35000
```

Set the actual costs and current time period and calculate the AC to date:

```
actual_costs <- c(9000, 18000, 36000, 70000, 100000)
time_period <- 3
ac <- ac(actual_costs, time_period)
cat("Actual Cost (AC):", ac, "\n")
#> Actual Cost (AC): 36000
```

Calculate the SV and CV and print the results:

```
sv <- sv(ev, pv)
cat("Schedule Variance (SV):", sv, "\n")
#> Schedule Variance (SV): -5000
cv <- cv(ev, ac)
cat("Cost Variance (CV):", cv, "\n")
#> Cost Variance (CV): -1000
```

Calculate the SPI and CPI and print the results: