On May 3, 2010, at 6:22 PM, vincent.deluard wrote:


Hi there,

This will sound very stupid because I just started using R but I see you had
similar problems.

I just loaded a very large dataset (2950*6602) from csv into R. The format
is ticker=row, date=column.

Not a particularly precise description of what is in the data.


Every time I want to compute basic operations, R returns "In Ops.factor: not
meaningful for factors"

Code .... we want to see code. All of it.

I believe it is because R does not read the data as numbers

Probably true. Were they dates or numbers?

but I am not
sure. Can anybody help?

I generally read in my data with read.table( ,,,,, as.is=TRUE, stringsAsFactors=FALSE, ....) and then convert the columns that I know should be numeric with as.numeric. If all of your columns should have been numeric, you might use the colClasses argument, perhaps along these lines:

rd.obj <- read.csv(file="something", colClasses= rep("numeric", <number-of-columns>) )

--
David Winsemius, MD
West Hartford, CT

______________________________________________
R-help@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.

Reply via email to