I have retrieved a sheet from google sheets and returned me a list of lists:
sheet <- list(var1 = list(Sys.time(), Sys.time(),NULL),
var2 = list(NULL,1,2),
var3 = list("a",NULL,"b"))
I have to convert all members of the list that are NULL into NAs. I was kindly explained how to do it list by list using for example sheet$var1[sapply(sheet$var1,is.null)] <- NA, but since I have many variables, is it possible to code it in just one line? Any help will be greatly appreciated.