R convert large character string to dataframe

前端 未结 3 1484
执笔经年
执笔经年 2020-12-31 16:00

I am having trouble converting a large text string to a dataframe. I\'ve been unable to figure this simple task out yet. Hoping for your help.

x <- \"1 ap         


        
3条回答
  •  别那么骄傲
    2020-12-31 16:41

      read.table(text=x,col.names=c('ID','Name'))
      #     ID      Name
        1    1     apple
        2  200 blueberry
        3 3000      pear
        4 4400 raspberry
    

提交回复
热议问题