use colClasses to define the columns that you want to read is as date as
'character' to keep the leading zeros.

On 12/28/06, Brian Edward <[EMAIL PROTECTED]> wrote:
>
> Thanks for the help in addressing my query regarding the formatting of
> dates.  All the suggestions were very helpful and I seem to be on track
> with
> solving the problem.  Don, you are exactly right in your posting -- that
> is, the issue of the leading zero.  And that is where my problem is.  When
> I
> read the CSV file into R, the leading zero is dropped.  Here is sample
> code
> for reading the file.  Can you give me a suggestion on how to keep the
> leading zero?  That seems to be my last remaining problem.
>
> DATES <- read.csv("C:/Data/dates.csv", header=TRUE, sep=",", dec=".",
> strip.white=TRUE)
>
> Thanks in advance.
>
> -Brian
>
>
> "They would have to be character vectors in
> > order to display the leading zero, as in 032398."
> >
> >
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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