R - remove anything after a comma from a column
I would like to strip this column so that it just shows the last name - if there is a comma, I would like to remove the comma and anything after it. I have a data column that is a combination of only last names and finally first. The data looks like this:
Last Name
Sample, A
Tester
Wilfred, Nancy
Day, Bobby Jean
Morris
+3
source to share