# Example factor vector
factor_vec <- factor(c('apple', 'banana', 'cherry'))
# Map levels to uppercase if they start with 'a'
ft_map_func(factor_vec, function(x) {
ifelse(grepl('^a', x), toupper(x), x)
})
Run the code above in your browser using DataLab