I am using R-Snippet to run a long R code.
What I found out is that when you connect a table (knime node) to R-snippet node, in case you have a timestamp, R-Snippet automatically changes it to String data type. Because I need to do calculations in R-Snippet having the variable “perioddate” (format is 2018-06-03) as a timestamp and not as a string, I decided to change the data type of the variable inside the snippet. I tried all the possible commands, which are correct, and non of them is doing the change I need within the R-Snippet.
knime.in$“PeriodDate2”<- format(as.Date(knime.in$“PeriodDate”), “%Y-%m-%d”)
Did anyone had the same problem? did someone found how to solve it?
I would appreciate any feedback, because is important to get the timestamp data type within the R-snippet.