Outputting a Dataframe in R to a .csv

后端 未结 3 603
滥情空心
滥情空心 2021-02-07 03:16

So I\'m trying to write a .csv file based on a data frame in R, but for some reason I keep getting the following error:

Error in .External2(C_writetable, x, file         


        
3条回答
  •  误落风尘
    2021-02-07 04:01

    One of your columns is of type list, so the data.frame is no longer 2-dimensional and can't be exported to a 2d csv-file.

    If you still want to store the list in the resulting output, you might transform it to JSON first. So it becomes an column of type "character" which can be easily exported as one column to csv.

提交回复
热议问题