小编dan*_*anu的帖子

读取csv数据时如何避免R中的因素

我有一个 csv 文件中的数据。当我阅读它时,这些列处于因子级别,我无法进行任何计算。

我使用过, as.numeric(df$variablename)但它为变量呈现了一组完全不同的数据。

original data in the variable: 2961,488,632,
   as.numeric output: 1,8,16
Run Code Online (Sandbox Code Playgroud)

csv r dataframe

1
推荐指数
1
解决办法
3507
查看次数

标签 统计

csv ×1

dataframe ×1

r ×1