I have a data frame containing huge amount of values. The data frame is as follows
> datedPf
date ticker quantity
96828 2013-01-11 ABT 700
96829 2013-01-11 AMD 9600
96830 2013-01-11 AMG 600
96831 2013-01-11 AGCO 800
96832 2013-01-11 A 1300
etc...
The type of the "ticker" and "quantity" columns are factor
. I found this using class(datedPf$ticker)
and class(datedPf$quantity)
respectively. But the type of the "date" column is date
. I want to change that type to factor
. How can I change this?
datedPf$date = as.factor(datePf$date)
but are you sure that it is what you want to do ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With