Imported a csv-dataset to R but the values becomes factors

后端 未结 8 1399
灰色年华
灰色年华 2020-11-29 01:19

I am very new to R and I am having trouble accessing a dataset I\'ve imported. I\'m using RStudio and used the Import Dataset function when importing my csv-file and pasted

相关标签:
8条回答
  • 2020-11-29 02:02

    You can set this globally for all read.csv/read.* commands with options(stringsAsFactors=F)

    Then read the file as follows: my.tab <- read.table( "filename.csv", as.is=T )

    0 讨论(0)
  • 2020-11-29 02:09

    Both the data import function (here: read.csv()) as well as a global option offer you to say stringsAsFactors=FALSE which should fix this.

    0 讨论(0)
提交回复
热议问题