I have a lot of records like "LISTA CIVICA | blablabla". They are character-class under the column "partito". I need to cut off the "| bla bla bla" in order to obtain for all the records just "LISTA CIVICA".
I need to obtain only LISTA CIVICA for all those records.
I tried this code but it does not work
gsub(pattern="",replacement = "LISTA CIVICA",ammcom$partito)