Issue with findGivenNames() Column Matching in genderizeR Package
I encountered an issue with the findGivenNames() function in the genderizeR package. When using the function without specifying the use.names argument explicitly, the function does not correctly match columns by name and defaults to use.names=FALSE, leading to column misalignment. The error message suggests using use.names=TRUE, but this behavior is not the default, even though the column names appear to be similar.
Steps to Reproduce
Here is the code that triggers the issue:
library(genderizeR)
Example input
x = c("Winston J. Durant, ASHP past president, dies at 84",
"JAN BASZKIEWICZ (3 JANUARY 1930 - 27 JANUARY 2011) IN MEMORIAM",
"Maria Sklodowska-Curie")
Search for terms that could be first names
givenNames = findGivenNames(x, progress = FALSE)
The following error is returned:
Column 2 ['name'] of item 2 appears in position 1 in item 1. Set use.names=TRUE to match by column name, or use.names=FALSE to ignore column names. use.names='check' (default from v1.12.2) emits this message and proceeds as if use.names=FALSE for backwards compatibility. See news item 5 in v1.12.2 for options to control this message.
givenNames = findGivenNames(x, progress = FALSE, use.names=TRUE)
Error in findGivenNames(x, progress = FALSE, use.names = TRUE) :
unused argument (use.names = TRUE)
Environment
• Package version: genderizeR 2.0.0
• R version: 4.3.1
• Operating System: macOS