The way you describe your function doesn't match its current functionality, which always is to return a fixed 'a' response.
It would be easier to help you if we were clear in what you want to achieve.
To turn any vector into a character vector. the command as.character() is likely the best one liner approach, it could be that simple ?
#3 function that solves the problem in one step using subsetting
b <- c(2, 5, 7, 8)
subsetting_function <- function (a){
my.result <- a [ ]
return(my.result)