I would like to split one column into two within at data frame based on a delimiter. For example,
a|b
b|c
to become
a b
b c
within a data frame.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@Taesung Shin is right, but then just some more magic to make it into a
data.frame.I added a “x|y” line to avoid ambiguities:
Or, if you want to replace the columns in the existing data.frame:
Which produces: