Where can I find R function expandDates?

I have received some software in R to run which calls on many Packages/Libraries not specified in the code. I have been tracking down the functions one by one in various packages but cannot find one function:


I tried packages like Chron or other time/date processing packages with no luck from: https://cran.r-project.org/web/packages/available_packages_by_name.html

The call looks like this:

tte_increm <- expandDates(start_date = start_date, end_date = end_date)$time.days[['numTotDays']]/365 start_date <- '2017-09-01' end_date <- '2018-12-31'

Help, please!

Could this be an internal function in the "software"?

And when you say you "received some software in R" do you mean someone sent you a bunch of scripts/functions that you need to source before you run?

Does the code run?

Is it possible that you didn't receive all of the files?

All the code available actually comes from GitHub: github.com/andrepoorman/PFE
It uses a number of functions from Libraries not specified by the author. It's possible "expandDates" is user defined & the code not included, but I tracked down all the other functions to various CRAN packages eventually.

@andrepoorman I see.
I have a big problem with code that has a ton of library statements for the exact reason you have encountered. All functions (other than maybe shiny, shinydashboard) should be explicitly referenced using the package namespace, eg plotly::add_lines

Anyway, I cloned the repo, but can't install the package aligne2. Its not available for my version of R (3.6.1 ). And i can't find documentation on the web. Could you find anything?

Saying that, i see the function you are referring to in the helper file. I still think this function is a user defined function that wasn't included in the repo. I see you made an issue in the developers repo. I was going to suggest that!

It looks like expandDates it is calculating some sort of time increment. I wonder if you can just take (end-start)/365 and see if the app behaves.

Good luck

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.