1 Reply Latest reply on Jan 2, 2018 3:29 PM by Mary Solbrig

    Tableau Using R How to View the R LM Function Summary as one text

    Robert Warren

      Is it possible to view the R LM Function Summary text within Tableau as one set of text instead of referring to each variable separately?

        • 1. Re: Tableau Using R How to View the R LM Function Summary as one text
          Mary Solbrig

          R doesn't make it super easy to deal with the summary as a string. Here is an example of returning the summary as a single string, using some slightly less-than-elegant R code:

           

          SCRIPT_STR(

          "

          example_lm <- glm(.arg2 ~ as.factor(.arg1))

          f <- capture.output(example_lm)

          paste(f, collapse = '\n')

          ",

          MAX([Ship Mode]),

          SUM([Profit])

          )

           

          You might find some better examples from Stack Exchange.

           

          If that doesn't produce the result you're looking for, could you post an example workbook? R questions are usually much easier to answer with the context of how the dashboard/worksheet is structured.