For the inverse, see vector_to_string
.
str_to_vctr(string)
# String to Vector test_vctr <- "c('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J')" str_to_vctr(test_vctr)#> [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J"test_vctr <- 'c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J")' str_to_vctr(test_vctr)#> [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J"test_vctr <- 'c(\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\")' str_to_vctr(test_vctr)#> [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J"#> [1] "c('A', 'B', 'C', 'D', 'E')"#> [1] "c(\"A\", \"B\", \"C\", \"D\", \"E\")"