R Convert list to lowercase
You should use lapply
to lower case each character vector in your list
lapply(var1, tolower)
# [[1]]
# [1] "parts of a day" "time in astronomy" "star"
#
# [[2]]
# [1] "tree tall" "pine tree"
otherwise tolower
does as.character()
on your entire list which is not what you want.
Use gsub
gsub("/", "", var1)
as.list(tolower(var1))
this will remove all your / out of your variable.