jpmml / jpmml-r

Java library and command-line application for converting R models to PMML
GNU Affero General Public License v3.0
33 stars 8 forks source link

Support for date/datetime parsing functions #9

Open vruusmann opened 6 years ago

vruusmann commented 6 years ago

The PMML specification supports temporal data types: http://dmg.org/pmml/v4-3/DataDictionary.html

It should be possible to parse strings into "proper" date/datetime objects using the base::strptime function, and then do basic arithmetic on them (eg. calculating deltas).

For example, it should be possible to do something like that:

as.formula("y ~ I(strptime(x1) - strptime(x2))")