Displaying 1 result from an estimated 1 matches for "st_date".
Did you mean:
st_data
2008 Dec 10
2
Confusion with Converting Factors to Dates using as.date
...f the values are converted "correctly" (and by this I guess I mean converted "as I wish them to be") but some have not been.
Here's what I have:
str(pk.df)
'data.frame': 206 obs. of 134 variables:
$ uniqid : int 010 015 120 130 210 245 320 330 415 ...
$ st_date : Factor w/ 154 levels "01/01/48","01/01/51",..: 46 27 NA 12 118 NA 63 127 NA NA ...
...
I then convert them to a date class using
st_date.new<-as.Date(st_date, "%m/%d/%y")
This _seems_ to work...
str(st_date.new)
Class 'Date' num [1:206] 8150 84...