I have a column of names in R that are separated by a comma.
For example:
John, Doe
Rebecca, Homes
I'd like to separate the first and last names into separate columns.
One additional problem I have is that sometimes there will be a name that doesn't have a comma. For example:
John, Doe
Rebecca, Homes
Organization LLC
I've looked at using strsplit(a, ","), but I get the following error Error in strsplit(wn, ",") : non-character argument.
Here is an example within Stack Convert comma separated entry to columns
Any help regarding solving this simple problem will be greatly appreciated. Thanks.