Skip to content

Comparing data

3 messages · Matevz Pavlic, Florent D.

#
Unlike a data.frame, a matrix can only hold one type of data. Since
you have a column of characters ("labSt") in your original data,
turning it into a matrix will give you a matrix of characters. You can
check it is the case by asking class(DF.m[1,1]).

So you'll have to remove this labSt column before you use as.matrix,
maybe use it for your rownames if you want to keep labSt around.


On Mon, Nov 28, 2011 at 11:49 AM, Matev? Pavli?
<matevz.pavlic at gi-zrmk.si> wrote:
#
Forgot to suggest: if labSt is the 1st column in your file, you could
just add "row.names = 1" to your read.csv call.
On Mon, Nov 28, 2011 at 8:06 PM, Florent D. <flodel at gmail.com> wrote: