Examples of the code you used would have helped i.e. We don't know how you transposed your matrix. Did you use t()? In any event, as.integer() may be what you need.

Francisco


From: Illyes Eszter <[EMAIL PROTECTED]>
To: r-help@stat.math.ethz.ch
Subject: [R] how to convert  strings back to values?
Date: Wed, 9 Nov 2005 21:55:44 +0100 (CET)

Dear All,

It's Eszter from Hungary, a total beginner with R. My problem is the
following:

I have a dataset with binary values as a comma separated textfile. The
samples are in the coloumns and the species are in the rows.

I have to transpose it for the further PCoA analysis. There is no
problem with reading the dataset.

When I transpose the dataset, the original values become strings
(instead of 0,1,0,0,1 I have "0","1","0","0","1"). The distance matrix
cannot be counted from the transposed dataset, I have 2 error
messages:

<Warning in vegdist(tdf1, method = "jaccard", binary = FALSE, diag =
FALSE,  : results may be meaningless because input data have
negative entries>

<Error in rowSums(x, prod(dn), p, na.rm) : 'x' must be numeric>

I do not understand the first, since I have only 1 and 0 in the dataset. I
guess I have the second because of the strings instead of values in the
dataset.

Could you please help me solving these problems? I could not find
anything about these in the manuals.

Thank you, cheers:

Eszter

p.s. This is a new problem, last week I worked with a similar dataset
and I did not get any error message like these.



_____________________________________________________________________
Menõ csengõhangok (MP3 is!) és színes képek a mobilodra.
Nálunk szinte mindent megtalálsz, KLIKK IDE! www.7777oplogo.hu

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to