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"))
You should check out PMML built-in functions
dateDaysSinceYear
anddateSecondsSinceYear
.