"Vertically str_split" in a column of a data-frame

Hi,

You could try with:

library(tidyverse)

df <- tribble(
  ~ 'Formal_Name', ~ 'Options',
  'sex_lookup',  '"Male";"Female"',
  'beneficiary_type_lookup','"Farmer";"Other";"Producer"'
)

df %>% separate_rows(Options, sep=";") -> final

Edit: The same idea as @mishabalyasin

4 Likes