Skip to content

automatic levels

2 messages · Moritz Lennert, Brian Ripley

#
Hello,

I've imported a csv, semi-colon spearated file with read.csv2,
containing one column of rownames and one column of floating point
numbers. When I look at the column of data with framename$columnname, I
get the values of the column plus level values. Are these level values
created automatically ?
The problem is when I try to calcluate the correlation coefficient
between this set of data and another with lm(x~y), the result indicates
that each level seems to have been used as independent variable, making
my results unusable.

How can I suppress the automatic creation of these levels ? Or how can I
model with lm() without the levels interfering ?
I've been trying to find the response in some of the manuals, but
haven't been able to, so if someone could just point me to the right
place...

Thank you !

P.S. I'm not subscribed to the list so I would aprreciate cc's to my
address.
#
On Fri, 6 Apr 2001, Moritz Lennert wrote:

            
Yes. It thinks the columns is not numeric.  Is read.csv2 actually
appropriate?  That is, are the numbers using `,' as the decimal separator?
Maybe you should be using read.table( , sep=";")?
That's not how to calculate correlation coefficients: see ?cor.
Well, we don't know what you actually did and you supplied no examples,
but my guess is that you need to go the R Data Manual and work out how to
read your file as numbers.