Re: [R] Matrix to data frame conversion

2012-11-14 Thread MacQueen, Don
So, if you have duplicate row.names, get rid of them. Try rownames(comb_model0) <- NULL as.data.frame(comb_model0) -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 11/12/12 7:45 AM, "PavloEs" wrote: >I have a matri

Re: [R] Matrix to data frame conversion

2012-11-12 Thread David L Carlson
avloEs > Sent: Monday, November 12, 2012 1:09 PM > To: r-help@r-project.org > Subject: Re: [R] Matrix to data frame conversion > > May be I have not clearly explained my problem. Le me try it again. My > problem was with the matrix "comb_model0" . I have tried to conve

Re: [R] Matrix to data frame conversion

2012-11-12 Thread PavloEs
May be I have not clearly explained my problem. Le me try it again. My problem was with the matrix "comb_model0" . I have tried to convert it to a data frame (xx), but could not succeed . As a result I have exported it to a test.csv file and re-imported it. Data frame test is the product of th

Re: [R] Matrix to data frame conversion

2012-11-12 Thread arun
way will be to use ?rbind() comb_model4<-rbind(as.data.frame(mat4),as.data.frame(mat3)) # no need colnames(comb_model4)[4]<-"Pr(>|t|)" A.K. - Original Message ----- From: PavloEs To: r-help@r-project.org Cc: Sent: Monday, November 12, 2012 10:45 AM Subject: [R] M

Re: [R] Matrix to data frame conversion

2012-11-12 Thread Rui Barradas
Hello, I'm unable to reproduce your error, removing the space in "Std. Error" and changing "t value" to "t.value" the following read in as data.frame with no problems. x <- read.table(text=" Estimate Std.Error t.value Pr(>|t|) (Intercept)

[R] Matrix to data frame conversion

2012-11-12 Thread PavloEs
I have a matrix which I wanted to convert to a data frame. As I could not succeed and resorted to export to csv and reimport it again. Why did I fail in the attempt and how can I achieve what I wanted without this roundabouts? The original matrix: > str(comb_model0) num [1:90, 1:4] 3.5938 0.0