Closed wissen-ist-acht closed 2 years ago
Previous version of code transformed coll$meta into a list, thus loosing the collection/dataframe structure needed for other avisblatt functions. With commit 739c3dd74da9525a26758868b1113044ba3409a0 this bug has been fixed as follows:
This test code was used to check if functions are now working properly:
devtools::load_all()
c_all <- gather_yearly_collections(1800, just_meta = FALSE)
ids <- select_by_text("all", c_all, "Barf(ü|u)(s|ss|ß)er|M(ue|ü|u)nster")
df <- data.frame(tag= c("Barfuesser", "Münster"), regex = c("Barf(ü|u)(s|ss|ß)er", "M(ue|ü|u)nster"))
hits_by_regex("all", c_all, df, "church")
c_all$meta$church[c_all$meta$id %in% ids]
ids <- select_by_tags(ids, c_all, "churchseat")
length(ids)
merges anna's function with some additions of mine to get an ordered list of hits of regex in a collection