Closed dcardosos closed 2 years ago
Hi!
The function process_sim return an error when process "OCUP" column. The error is:
process_sim
Error in dplyr::left_join(): ! Can't join on x$OCUP x y$OCUP because of incompatible types. ℹ x$OCUP is of type >. ℹ y$OCUP is of type >. Backtrace:
dplyr::left_join()
x$OCUP
y$OCUP
I identify the problem here:
https://github.com/rfsaldanha/microdatasus/blob/8ee453b630e9fc4fb4ec70f8533746bee51f7487/R/process_sim.R#L191-L204
When the code do colnames(tabOcupacao)[1] <- "OCUP" colnames(tabCBO)[1] <- "OCUP"
colnames(tabOcupacao)[1] <- "OCUP"
colnames(tabCBO)[1] <- "OCUP"
The type of these columns is integer, not character, and this causes the above error. I propose a Pull request to change this.
Thanks
That's great, thanks you!
Hi!
The function
process_sim
return an error when process "OCUP" column. The error is:Error in>.
ℹ >.
Backtrace:
dplyr::left_join()
: ! Can't join onx$OCUP
xy$OCUP
because of incompatible types. ℹx$OCUP
is of typey$OCUP
is of typeI identify the problem here:
https://github.com/rfsaldanha/microdatasus/blob/8ee453b630e9fc4fb4ec70f8533746bee51f7487/R/process_sim.R#L191-L204
When the code do
colnames(tabOcupacao)[1] <- "OCUP"
colnames(tabCBO)[1] <- "OCUP"
The type of these columns is integer, not character, and this causes the above error. I propose a Pull request to change this.
Thanks