as.int and as.num adds an as.character layer before conversion