[R] as>date parsing

Sarah Goslee sarah.goslee at gmail.com
Sat Mar 6 16:41:14 CET 2010


There are lots of ways to deal with text. One possibility would be to
check the length with nchar(), and if it is 5, use paste() to add a 0
to the beginning. Granted, not elegant.

Sarah

On Sat, Mar 6, 2010 at 10:17 AM, ManInMoon <xmoon2000 at googlemail.com> wrote:
>
> I have text date colum with dates such at 290210 which I can parse with
> %d%m%y but I also have date without leading zeo i.e. 10210 (Ist Feb 2010)
> which cause any NA.
>
> How can I parse the second one?
> --


-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list