[R] Custom axis with months name

Rui Barradas ruipbarradas at sapo.pt
Thu Jan 24 20:18:21 CET 2013


Hello,

To get the months names you can try

format(data[,1], "%B")

As for the axis, see the help page ?axis. Argument 'labels'.


Hope this helps,

Rui Barradas

Em 24-01-2013 17:34, Grigory Fateyev escreveu:
> Hello!
>
> I have data.frame with column class POSIXct:
>
> data[, 1] <- as.POSIXct(data[, 1], format = "%d.%m.%Y %H:%M")
>
> I need to write custom axis for plot where can be ex.: January (mean
> of january's temperature). List of month I get as table(months(data[,
> 1])). What is next step?
>
> Thanks.
>



More information about the R-help mailing list