Hi guys, new here!

I have a data frame with the dates of births as one of the vectors. I am trying to find out the ages of all of these people, but running into issues.

The vector is set as:

dob

When I type:

age_calc(dob[1])

It will tell me the age of the first person in the data frame. However, I can't for the life of me figure out how to work it out for everyone in the data frame. I have tried

age_calc(dob)

*Error in if (any(enddate < dob)) { :
missing value where TRUE/FALSE needed*

I have tried

age_calc(dob[1:300])

*Error in if (any(enddate < dob)) { :
missing value where TRUE/FALSE needed*

I have also tried many other variations, but can't get it. Is anyone able to help me at all? It would be much appreciate

Thank you!

Caz