Error while reading csv file in R

后端 未结 11 2153
自闭症患者
自闭症患者 2021-02-07 10:37

I am having some problems in reading a csv file with R.

 x=read.csv(\"LorenzoFerrone.csv\",header=T)

Error in make.names(col.names, unique = TRUE) : 
      inva         


        
11条回答
  •  花落未央
    2021-02-07 11:00

    This will read the column names as-is and won't return any errors:

    x = read.csv(check.names = F)
    

    To remove/replace troublesome characters in column names, use this:

    iconv(names(x), to = "ASCII", sub = "")
    

提交回复
热议问题