[R] Convert list to data frame

asma.rabe at gmail.com asma.rabe at gmail.com
Sat Feb 27 15:04:26 CET 2016


Hi,

I  read data from file as follows

Data<-read.table("file.txt",header=T,sep="\t")

mode(Data)
list

I want to convert data to data frame, I tried the following:

as.data.frame(Data)
data.frame(Data)

But the Data did not change

When I tried
as.data.frame(unlist(Data))

The Data converted to a vector not to a data frame. Any idea ?

Thank you in advance


Sent from my iPhone



More information about the R-help mailing list