Then, you can try:

For example:

head(df)
        date    value
1 1990-01-01 4.716572
2 1990-02-01 3.418355
3 1990-03-01 1.982209
4 1990-04-01 3.974942
5 1990-05-01 6.624222
6 1990-06-01 5.729092

max(as.Date(df$date))

or if you interest is in the month only:

max(format.Date(as.Date(df$date), "%m-%d"))


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

On 29/08/2007, Shubha Vishwanath Karanth <shubhak@ambaresearch.com> wrote:
>
>  But my dataset is a data frame….
>
>
>
> BR, Shubha
>  ------------------------------
>
> *From:* Henrique Dallazuanna [mailto:wwwhsd@gmail.com]
> *Sent:* Wednesday, August 29, 2007 5:12 PM
> *To:* Shubha Vishwanath Karanth
> *Cc:* r-help@stat.math.ethz.ch
> *Subject:* Re: [R] Month end calculations
>
>
>
> Hi,
>
> Perhaps if object is of the type 'ts', the command 'end' can usefully.
>
> --
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>
> On 29/08/2007, *Shubha Vishwanath Karanth* <shubhak@ambaresearch.com>
> wrote:
>
> Hi R users,
>
>
>
> Is there a function in R, which does some calculation only for the month
> end in a daily data?... In other words, is there a command in R,
> equivalent to "last." function in SAS?
>
>
>
> BR, Shubha
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>
>
>

	[[alternative HTML version deleted]]

