Skip to content
Prev 43836 / 398502 Next

vector of factors to POSIXlt

hello,
I have a vector of factors
Factor w/ 51 levels "1/10/03","1/13/03",..:
[1] 87

which i want to convert to class POSIXlt to extract the day, so:
a1<-format(rcptdt,"%m/%d/%y")
[1] 87

and:
a2<-strptime(a1, "%m/%d/%y")
str(a2)
`POSIXlt', format: chr [1:87] "2002-04-18" "2002-07-19" "2002-08-02"
"2002-08-14" ...
Time difference of -92 days

but the length differs
[1] 9

and i cant update rcptdt...
_              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    1              
minor    8.1            
year     2003           
month    11             
day      21             
language R 

thanks,

amer
research analyst
disability det. bureau
madtown-wi-usa