[R-SIG-Finance] day/month/year functions?

G See gsee000 at gmail.com
Tue Jul 23 02:21:36 CEST 2013


I'd guess they come from lubridate.  Although, they exist is a few packages.

findFn() from the sos package is really good for finding out where a
function comes from.

library(sos)
findFn("day")

# it works better for functions with more obscure names.

Garrett


On Mon, Jul 22, 2013 at 7:15 PM, Mark Knecht <markknecht at gmail.com> wrote:
> Hi,
>    I've got a piece of old code I'm trying to resurrect which contains
> this function to convert R dates to TradeStation dates:
>
> function (MyDate) {
> ThisDay = day(MyDate)
> ThisMonth = month(MyDate)
> ThisYear = year(MyDate)
> TSDate = (ThisYear - 1900)*10000 + ThisMonth*100 + ThisDay
> return(TSDate)
> }
>
> However I don't have the day/month/year functions and so far haven't
> found them searching using ??day, etc.
>
> Does anyone recognize these as coming from a package that for some
> reason might not be showing up using ??-type searching?
>
> Thanks,
> Mark
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



More information about the R-SIG-Finance mailing list