R script node change Date to Double

There has been a quite similar discussion

So far I was only able to extract Date values from R as either Strings or Unix Timestamps which are somewhat uncomfortable to handle in KNIME later. As you ca see in the example within R they are stored as dates but once you bring them back to KNIME they are either strings or UNIX Timestamps.

Another attempt could be to store the date as a long variable in the form of
(year * 1000) + (month * 100) + day
2018-06-01 => 20180601

I use R 3.4.4 since I am not sure the RServe bug with KNIME and R 3.5 has been solved.

kn_example_r_date2.knwf (58.3 KB)