I have several tables of data that include different sorts of non-UTF8 characters. I would like to know in which tables and which columns these characters exist. So I have a large list containing lists of data. I am trying to write a loop but it does not seem to work. Here I am basically saying if any of these unknown characters exist in my data, filter them out.
for (table in names(tables)) { #this gives the table names
for (item in names(tables[[table]])){ #this gives the variables within each table
if(grepl("[^\x01-\x7F]", tables[[table]][[item]])){filter(grepl("[^\x01-\x7F]", tables[[table_name]][[name]]))}
}}
Error: the condition has length > 1
Can you advise me on it please?