Navigation Menu

Skip to content

Commit

Permalink
Changed denominator to 365.25 to have more accurate age calculations.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbryer committed Apr 19, 2012
1 parent f6ea2ba commit 4b5d915
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/age.R
Expand Up @@ -2,7 +2,7 @@
#' @author Jason Bryer <jbryer@@excelsior.edu>
#' @export
getAge <- function (dateCol, calcDate) {
as.numeric((as.Date(calcDate) - dateCol)/365)
as.numeric((as.Date(calcDate) - dateCol)/365.25)
}

#' Returns a factor variable using the given breaks and labels. Will calculate the
Expand Down

0 comments on commit 4b5d915

Please sign in to comment.