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
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
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
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
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)
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
6 matches
Mail list logo