Hi Shubha,
By using the tautology that the end of a month is immediately followed by the first of a month, the following returns a TRUE when the date is the last day of a month IsMonthEnd <- format(MyDates + 1, "%d") == "01" where MyDates is a vector, or column in a data frame, typed as Date (eg with as.Date) -- HTH, Jim Porzak Responsys, Inc. San Francisco, CA http://www.linkedin.com/in/jimporzak On 8/29/07, Shubha Vishwanath Karanth <[EMAIL PROTECTED]> 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. > ______________________________________________ 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.