I am receiving the following error:
'pattern' must be a non-empty character string
when trying to run the following:
rapply(as.list(Database1), function(x) agrep(x,Database2, max.distance=c(cost=1), value=T))
with large databases
> length(Database1)
[1] 15876500
> length(Database2)
[1] 605
But not when I run it with small ones
> length(Database1)
[1] 29
> length(Database2)
[1] 8
I know I should put up reproducible code so the databases are just 15-25 character strings of random letters that can be generated using the following:
Database1<- unlist(replicate(n, paste0(sample(LETTERS, m), collapse="")))
where "n" is the length and "m" is an integer between 15-25.