Getting Error in strsplit(names(res), \.) : non-character argument.