[R] Odp: dataframe

Petr PIKAL
Mon, 19 Apr 2010 10:24:03 -0000

Hi


r-help-bounces at r-project.org napsal dne 19.04.2010 10:12:59:

> Hi all,
> I'm trying to load a csv file in which all the variables must be of
type

> number.The object is a dataframe.When i load the file what i get is a
dataframe

You probably have non numeric data in your original CSV. Either you can
correct it before reading it or you could try to force colClasses
parameter of read.*whatever* you use and failed to tell.

Another option is to remove nonumeric items and change factors to numeric

see
?as.numeric and ?as.character

Regards
Petr

> in wich the variables are of type factor.How can I get variables of type

> number???
> Thanks all
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.