Closed novica closed 4 years ago
From what I understand online, the error in the "Only strings can be converted to symbols" error occurs when you are trying to set something that is not a string to be the name of an object or variable. So I think both of these issues come from line 40.
NAs don't interrupt parse_number, and I removed the empty lines before running the parser.
Completely rewrote function logic, should cause no issues however it's untested on Linux.
As the title says this is the error I get.
It seems to me that
parse_number
in theclean
function fails because the dataframe has NAs and "" (empty strings?). Maybe a solution would be to turn all NA and "" to "0" and thenparse_number
, then convert 0 to NA. Or maybe usestringr::str_replace_na
to getNA_character_
.Also as far as I can see there are some things going on in line 40:
headers <- c('Items','TTM', matches[[1]][,1])
that messes the column names leaving some columns without a name. This has implications further down the code at line 62. Maybe I should've made another issue for this one.