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 <xmoon2...@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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to