Hi Bert;
I sincerely appreciate for this. When I follow your way I have got
dimnames(dm)
[[1]]
NULL
I think this is the reason why the matrix is being converted into a column
vector.
Regards,
Greg
On Tue, Sep 19, 2017 at 11:32 AM, Bert Gunter
wrote:
> Works fine for me. What do you object t
Cc: r-help mailing list
Subject: Re: [R] remove quotes from matrix
Dear all;
Thanks. Here are the dput results as Duncan suggested.
Regards,
Greg
structure(list(Sub_Pathways = structure(c(3L, 3L, 3L, 3L, 3L), .Label =
c("Acetylated_Peptides", "Advanced_Glycation_End
Works fine for me. What do you object to in the following?
Calling the above df "d",
> dm <- as.matrix(d)
> dm
Sub_PathwaysBMI_beta SAT_beta VAT_beta
1 "Alanine_and_Aspartate" " 0.23820" "-0.02409" " 0.94180"
2 "Alanine_and_Aspartate" "-0.31300" "-1.97510" "-2.22040"
3 "Alanine_
Dear all;
Thanks. Here are the dput results as Duncan suggested.
Regards,
Greg
structure(list(Sub_Pathways = structure(c(3L, 3L, 3L, 3L, 3L), .Label =
c("Acetylated_Peptides",
"Advanced_Glycation_End-product", "Alanine_and_Aspartate", "Aminosugar",
"Ascorbate_and_Aldarate", "Carnitine", "Cerami
Your claims are false -- or at least confused.
> d <- data.frame(a = I(letters[1:3]), b = 1:3)
## the I() is to prevent automatic conversion to factor
> d
a b
1 a 1
2 b 2
3 c 3
> dm <- as.matrix(d)
> dm
a b
[1,] "a" "1"
[2,] "b" "2"
[3,] "c" "3"
> dimnames(dm)
[[1]]
NULL
[[2]]
[1] "a"
Greg, I think you should stop using noquote, because it is doing something that
will not be useful to you for preparing your data for analysis.
Please follow Duncan's advice and provide us with a sample of your data. Also,
please set your email program to send plain text rather than HTML format
Hi Duncan and Bert;
I do appreciate for your replies. I just figured out that after x1=
noquotes(x) commend my 733*22 matrix returns into n*1 vector. Is there way
to keep this as matrix with the dimension of 733*22?
Regards,
Greg
On Tue, Sep 19, 2017 at 10:04 AM, Duncan Murdoch
wrote:
> On 1
On 19/09/2017 9:47 AM, greg holly wrote:
Hi all;
I have data at 734*22 dimensions with rows and columns names are
non-numeric.When I convert this data into matrix then all values show up
with quotes. Then when I use
x1= noquotes(x) to remove the quotes from the matrix then non-numeric row
names
Hi all;
I have data at 734*22 dimensions with rows and columns names are
non-numeric.When I convert this data into matrix then all values show up
with quotes. Then when I use
x1= noquotes(x) to remove the quotes from the matrix then non-numeric row
names remain all other values in matrix disappear
9 matches
Mail list logo