I am a noob in R, so this is probably my fault, but I am getting slightly different results from running my code in RStudio and in KNIME.
In my code I take the min and max date of a data set for the current loop iteration. I do the following steps:
- use as.Date() to convert my “week_ending” column in my data frame to a date.
- get the min(week_ending) and max(week_ending) points for the current loop iteration
- convert the min & max to date using as.Date (I’m not sure why I have to do this, but if I don’t, the data ends up like in the last screenshot)
- save my results as a data frame…
In R Studio, the results are as expected:
When I view the dataframe output in KNIME’s R to Table by double clicking on the name in the workspace, the results are as expected:
However, when I actually view the table in KNIME, the results are not as expected:
Can anyone help me figure out why this is happening?
If it is helpful, I am using packages: “changepoint” and “dplyr” (changepoint also bundles the package “zoo”, which I believe is where as.Date comes from)
Thanks for your help