This function reads W2 data from an Excel file for a given year, calculates the total amount for each person and category, and generates a summary table.

summary_w2(year, by_person = FALSE)

Arguments

year

The year for which W2 data is to be summarized.

by_person

Logical indicating whether to summarize the data by person (default: FALSE).

Value

A flextable object representing the summary table of W2 data for the specified year.