Gender of first names

I have a column of first names that I would like to replace with gender derived from the names)
for (i in df2[2]){(c(gender(i)$gender))}
does not work for me
can someone help
I’m new to R

Thankyou

Welcome! It's helpful if you are able to build a more thorough reprex ("reproducible example") of your example so that others can see your desired output and reproduce the behavior in their own environment, if necessary.

I'm guessing you're using https://github.com/ropensci/gender ? In which case you can ask your question in rOpenSci forum https://discuss.ropensci.org/ :slightly_smiling_face:

Besides, I'm not sure what your goal with this is, but just in case and also for people's reading this thread, here is a reference of a good post about gender mapping.