r - Extract all information AFTER a comma in a data frame column -


how can extract information after comma data frame column in r?

polyname south dakota,minnehaha colorado,larimer nebraska,adams nebraska,adams nebraska,adams 

i want return column like

counties minnehaha larimer adams adams adams 

try

 df1$counties <- sub('^[^,]+,', '', df1$polyname) 

Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -