Added as.character() to base::split on w (a vector)