If I had a data.frame with two columns, name and age, what function would I use to go through the age column and select only the first number and have it put in a new column.
name age
Jack 43 - 44 Years
Jill 37 - 38 Years
Mike 17 - 19 Years
Jan 21 - 22 Years
Steve 25 - 30 Years
I don't even know how to look this up because I don't know what it is called. I have done multiple searches to no avail. so sorry it may seem like I am being lazy but I am just very new to R and programming in general. Thank you for your time.