[R] plotting date data over couple of months

David Winsemius dwinsemius at comcast.net
Thu Jul 14 01:35:10 CEST 2011


On Jul 13, 2011, at 6:56 PM, vamshi999 wrote:

> Hi .. i am a beginner in R
>
> I have data in the format of
>
> date
> 04/27/11
> 04/27/11
> 04/30/11
> 04/30/11
> 05/03/11
> 05/03/11
> 05/04/11....

So they are not yet dates, but rather character vectors. R dates don't  
look like that unless you make special efforts to mess them up.

>
> Now i want to plot the data something like this on x-axis...
>
>             ------------------
>               27 28 29 30 1 2 3 4
>               April             May
> I also wanted to know how to place a "*" when a date is missing from  
> the
> data..

If you convert to dates, then the axis function should be able to  
properly label a plot.
Read:

?DateTimeClasses

>
> my other question is plotting the error bars.. since you can see  
> that i have
> dates repeating. how to plot the error bars for count number of dates
> detected...

Need a better description of the data. So far you have only said you  
have dates. You should probably... no, make that definitely...  read  
the Posting Guide.

>
> I would appreciate if someone could answer as soon as possible...

Answers given to the extent possible given the limitations of the  
question.

>
> thank you in advance..
>

--

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list