How to remove spaces between items in an R list

animalList <- list(c("Chicken","Dog","Cat","Monkey","Pig","Ant"))
animalList
#> [[1]]
#> [1] "Chicken" "Dog"     "Cat"     "Monkey"  "Pig"     "Ant"
str(animalList)
#> List of 1
#>  $ : chr [1:6] "Chicken" "Dog" "Cat" "Monkey" ...
animalList <- list("Chicken","Dog","Cat","Monkey","Pig","Ant")
str(animalList)
#> List of 6
#>  $ : chr "Chicken"
#>  $ : chr "Dog"
#>  $ : chr "Cat"
#>  $ : chr "Monkey"
#>  $ : chr "Pig"
#>  $ : chr "Ant"

For future questions: See the FAQ: How to do a minimal reproducible example reprex for beginners