我有一个这样的变量:
| 勇气 |
|---|
| 3.554,34 |
| 56,34 |
但它的类是“字符”,当我编码时:
gastosbolsonaro <- gastosbolsonaro %>% mutate(VALOR = as.numeric(VALOR))
Run Code Online (Sandbox Code Playgroud)
发生这样的事:
Problem while computing `VALOR = as.numeric(as.character(VALOR))`.
i NAs introduced by coercion
Run Code Online (Sandbox Code Playgroud)
所有值都变为 NA。
我想将超值货币更改为数字类别