employee_df <- data.frame(
employee_id = 1:6,
first_name = c("Alice", "Bob", "Charlie", "Diana", "Eve", "Frank"),
last_name = c("Johnson", "Smith", "Brown", "Davis", "Wilson", "Miller"),
department = c("IT", "Sales", "IT", "HR", "Sales", "IT"),
salary = c(75000, 65000, 80000, 70000, 68000, 82000),
start_date = as.Date(c("2020-01-15", "2019-06-01", "2021-03-10",
"2020-08-20", "2019-11-05", "2022-02-01")),
is_manager = c(FALSE, TRUE, FALSE, TRUE, FALSE, TRUE),
performance_rating = factor(c("Excellent", "Good", "Excellent",
"Good", "Fair", "Excellent"),
levels = c("Poor", "Fair", "Good", "Excellent"),
ordered = TRUE),
stringsAsFactors = FALSE
)
# Simple filtering
it_employees <- employee_df[employee_df$department == "IT", ]
cat("IT employees:\n")