DaysSinceWhen

DaysSinceWhen("date") returns a digital value of the number of days since the date entered. This simple function can be enhanced if needed to include time zones, etc.

Please see the extensive details on the DaysSinceWhen() package and function in its help file i.e. ?DaysSinceWhen

The following example may be of assistance if an integer value is needed:

NumDays <- as.integer(DaysSinceWhen("2000-1-1"))

Please observe the use of "as.integer()" above

It is often important to know the number of days since an event. This package provides a function for that purpose.

As an example, some nutrition assessment methodologies are based upon the age of child in "days" to utilize a look-up table to compute z-score values for the child.

The function implemented in the package has the same name as the package:

Important: Please use as.integer(DaysSinceWhen("date"")) to obtain an integer value for the number of days since the date entered.

DaysSinceWhen Code for an non-integer return value



RobertHagan/DaysSinceWhen documentation built on May 10, 2019, 12:52 p.m.