1 2 Previous Next 21 Replies Latest reply on Mar 10, 2017 1:55 AM by Eugene Chua

    R integration, object of different length than original data

    Edwin Thoen

      I am trying to make more use of the R integration in Tableau. I have stumbled upon the following problem; the objects that are returned from R have to be of the same row length as the data set in Tableau. Thus it has to return a value for each row. In one of his examples Bora Beran applied a trick by assigning the k-means cluster centers to each case with plyr::join. I am working on a forecasting problem in which I'd like to predict a time series with the values of another time series as a predictor. I use the auto.arima function from the excellent fpp package. However the forecasted values are extending one of the variables instead of being an extra variable. See the calculated field Predict Consumption in the attached workbook.


      I have tried several things like creating missing values first and later imputing these, but this not seem to work. Maybe someone from Tableau who knows how the forecasting functions are implemented into the software has a good idea how to implement this.


      Moreover it would be extremely helpful if in upcoming versions of Tableau it would be possible to have objects returned from R that are not of length n, so we don't have to trick our way around it each time. I understand this is challenging to implement, but keep it in mind.


      Thanks in advance for any suggestions,


        1 2 Previous Next