Open millmeli42 opened 2 years ago
Have you created this function already?
get_first_name( name=d$Full.Name )
Yes I have.
head(d$first.names)
[1] " Mohammad" " Jose Maria Reynaldo Apollo"
[3] " Kelsea" " Enyah"
[5] " Precious" " James"
My d dataframe has 7 variables and 12,520 observations. My gen data frame has 0 observations and 6 variables. I know the problem is there.
My unique.first.names has 3,647 names
first.names has 12,520 observations
Do you get errors at this step then?
library( gender )
gen <- gender( unique.first.names )
No error, it runs, there are just no observations and 6 variables in the gen dataframe
library(gender) gen <- gender(unique.first.names) head(gen) %>% pander
name proportion_male proportion_female gender year_min year_max No data available in table
I can’t tell what’s happening from the code you provided because it’s unclear whether your unique.first.names is empty or the gender() function is not working.
If it’s the gender function I would close down R Studio and try installing the gender packages fresh.
Do you get errors at this step then?
library( gender ) gen <- gender( unique.first.nam
I have the same issue and I am having error when I run the code. Am stack on step 3
Hello Professor-
I have successfully loaded the gender data into R -
Please see below:
However, In step 3 I cannot populate any gender data? I have names in my first.names. I have names in unique names, but when I run the following, I do not get what is in the lab. This is prior to merging the databases.
It shows 0 observations with 6 variables for gen.
name proportion_male proportion_female gender
Table: Table continues below
year_min year_max
Thanks!