[R-SIG-Finance] Converting factors back to numbers in R
volchik2000 at list.ru
Tue Dec 5 15:58:27 CET 2006
i've spent a lot of time trying to fix the following problem:
i'm trying to load into R several dataframes with stocks data through:
Because the header are times in the format "HH:MM" R converts them to strings, changing in the way. It's now a problem, i can fix it using sub (gsub) functions.
Problem is that R converts prices to factors as well even though i have option as.is=T set, and then it almost impossible to convert them back to double preserving the row.names (these are dates) and column names (times), probably because of the structure i store them in (list of dataframes).
I suspect there is an easy way to solve this problem, but couldn't figure it out :(
More information about the R-SIG-Finance