[R] reading csv-data

From: Johanna Sundvik <jsundvik_at_mail.student.oulu.fi>
Date: Fri 17 Jun 2005 - 23:50:00 EST

Hi!

I have had this problem for a long time. I have tried to study the manuals and search the mailing lists, but I can not solve this. I think there has to be one simple solution to this, but I just can not find it.

I have saved the data in excel (csv-format). Then I read the data in R e.g.

>data <- read.csv2("example.csv", header=TRUE)

I look the data and it looks ok. E.g

>data

     Mean1

1   4.4332  
2   8.5113  
3  35.1624 
4   9.1693 

5 2.974
6  65.1578 
7  43.2241 
8   3.1278 
9   5.3364 
10  3.9767 

However, this "Mean1" is categorical when it should be real numbers.

> Mean1

[1] 4.4332 8.5113 35.1624 9.1693 2.974 65.1578 43.2241 3.1278 5.3364 Levels: 2.974 3.1278 35.1624 4.4332 43.2241 5.3364 65.1578 8.5113 9.1693

Why R does not understand that this should be real numbers? What am I doing wrong here? Thanks for your help.

Regards,
Johanna Sundvik



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 Received on Sat Jun 18 00:03:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:48 EST