Closed bpbond closed 4 years ago
@bpbond we've fixed this in the past by wrapping any dplyr join calls with as.character, cf. ISRaD.flatten, ISRaD.extra.delta.delta, etc. I'll add that call to ISRaD.rep.count.frc. Seems like the easiest fix.
Note that "database" should have been created with stringsAsFactors=FALSE, but because not all studies have data in every table, there will always be different factor levels for the join by variables, e.g. "entry_name", "site_name", "pro_name".
Currently
ISRaD.rep.count.frc
has asuppressWarnings()
call around its join operations, because otherwise it generates:This isn't great, because it might hide real warnings we want to see.
What's the correct thing to do here? Should the elements of
database
have been created withstringsAsFactors=FALSE
originally? Or are those factors needed, and thusISRaD.rep.count.frc
should change them to character before joining?