0

I am generating some derived fields from a data set given to me. Below is an example of one such derived field. I am calculating age from birth date. Is there a way to generate pmml code for such calculations.

age <- as.numeric(format(Sys.Date(), "%Y")) - as.numeric(format(as.Date(birth_date, "%m/%d/%Y"), "%Y"))

user3641528
  • 101
  • 1
  • 7
  • 1
    The `pmml` package supports export to PMML. http://cran.r-project.org/web/packages/pmml/index.html – Andrie Dec 12 '14 at 15:06

1 Answers1

1

You should check out PMML built-in functions dateDaysSinceYear and dateSecondsSinceYear.

user1808924
  • 4,563
  • 2
  • 17
  • 20